Skip to content

Commit 4aacb80

Browse files
committed
use PackageId were we can
1 parent 95de3a1 commit 4aacb80

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/cargo/core/resolver/context.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl Context {
151151
pub fn build_deps(
152152
&mut self,
153153
registry: &mut RegistryQueryer<'_>,
154-
parent: Option<&Summary>,
154+
parent: Option<PackageId>,
155155
candidate: &Summary,
156156
method: &Method<'_>,
157157
) -> ActivateResult<Vec<DepInfo>> {
@@ -215,7 +215,7 @@ impl Context {
215215
/// Returns all dependencies and the features we want from them.
216216
pub fn resolve_features<'b>(
217217
&mut self,
218-
parent: Option<&Summary>,
218+
parent: Option<PackageId>,
219219
s: &'b Summary,
220220
method: &'b Method<'_>,
221221
) -> ActivateResult<Vec<(Dependency, Vec<InternedString>)>> {
@@ -299,7 +299,7 @@ impl Context {
299299
features
300300
)
301301
.into(),
302-
Some(p) => (p.package_id(), ConflictReason::MissingFeatures(features)).into(),
302+
Some(p) => (p, ConflictReason::MissingFeatures(features)).into(),
303303
});
304304
}
305305

src/cargo/core/resolver/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,12 @@ fn activate(
682682
};
683683

684684
let now = Instant::now();
685-
let deps = cx.build_deps(registry, parent.map(|p| p.0), &candidate, method)?;
685+
let deps = cx.build_deps(
686+
registry,
687+
parent.map(|p| p.0.package_id()),
688+
&candidate,
689+
method,
690+
)?;
686691
let frame = DepsFrame {
687692
parent: candidate,
688693
just_for_error_messages: false,

0 commit comments

Comments
 (0)