From 880337ac9c3d221cecd2e6d778cca6b8f9002f6f Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Wed, 4 Sep 2019 11:08:41 -0400 Subject: [PATCH] `map_dependencies` is doing a deep clone, so lets make it cheaper --- src/cargo/core/summary.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/summary.rs b/src/cargo/core/summary.rs index 7080d227453..d6732ec8997 100644 --- a/src/cargo/core/summary.rs +++ b/src/cargo/core/summary.rs @@ -26,7 +26,7 @@ pub struct Summary { struct Inner { package_id: PackageId, dependencies: Vec, - features: FeatureMap, + features: Rc, checksum: Option, links: Option, namespaced_features: bool, @@ -64,7 +64,7 @@ impl Summary { inner: Rc::new(Inner { package_id: pkg_id, dependencies, - features: feature_map, + features: Rc::new(feature_map), checksum: None, links: links.map(|l| l.into()), namespaced_features,