Skip to content

Commit a4c61aa

Browse files
committed
serialize version directly
1 parent 497f426 commit a4c61aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cargo/core/package.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl PartialOrd for Package {
5454
#[derive(Serialize)]
5555
struct SerializedPackage<'a> {
5656
name: &'a str,
57-
version: &'a str,
57+
version: &'a Version,
5858
id: PackageId,
5959
license: Option<&'a str>,
6060
license_file: Option<&'a str>,
@@ -104,7 +104,7 @@ impl ser::Serialize for Package {
104104

105105
SerializedPackage {
106106
name: &*package_id.name(),
107-
version: &package_id.version().to_string(),
107+
version: &package_id.version(),
108108
id: package_id,
109109
license,
110110
license_file,

0 commit comments

Comments
 (0)