Skip to content

Commit 6e10374

Browse files
committed
Auto merge of #6512 - matklad:serde-version, r=dwijnand
serialize version directly Streamline serialization more, cc #6511
2 parents c9ed7b2 + a4c61aa commit 6e10374

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)