Skip to content

Commit

Permalink
serialize version directly
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Jan 2, 2019
1 parent 497f426 commit a4c61aa
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 a4c61aa

Please sign in to comment.