Skip to content

Commit

Permalink
Auto merge of #6512 - matklad:serde-version, r=dwijnand
Browse files Browse the repository at this point in the history
serialize version directly

Streamline serialization more, cc #6511
  • Loading branch information
bors committed Jan 2, 2019
2 parents c9ed7b2 + a4c61aa commit 6e10374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cargo/core/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6e10374

Please sign in to comment.