From a4c61aa84b0d10b1d23ccd3ca22ef3ff3891bf7f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 2 Jan 2019 15:02:21 +0300 Subject: [PATCH] serialize version directly --- src/cargo/core/package.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/package.rs b/src/cargo/core/package.rs index 3ec85b9e271..d2364b136dc 100644 --- a/src/cargo/core/package.rs +++ b/src/cargo/core/package.rs @@ -54,7 +54,7 @@ impl PartialOrd for Package { #[derive(Serialize)] struct SerializedPackage<'a> { name: &'a str, - version: &'a str, + version: &'a Version, id: PackageId, license: Option<&'a str>, license_file: Option<&'a str>, @@ -104,7 +104,7 @@ impl ser::Serialize for Package { SerializedPackage { name: &*package_id.name(), - version: &package_id.version().to_string(), + version: &package_id.version(), id: package_id, license, license_file,