Function cargo::core::registry::summary_for_patch

source ·
fn summary_for_patch(
    orig_patch: &Dependency,
    locked: &Option<LockedPatchDependency>,
    summaries: Vec<Summary>,
    source: &mut dyn Source,
) -> Poll<CargoResult<(Summary, Option<PackageId>)>>
Expand description

A helper for selecting the summary, or generating a helpful error message.

Returns a tuple that the first element is the summary selected. The second is a package ID indicating that the patch entry should be unlocked. This happens when a match cannot be found with the locked one, but found one via the original patch, so we need to inform the resolver to “unlock” it.