diff --git a/crates/resolver-tests/src/lib.rs b/crates/resolver-tests/src/lib.rs index c1cabbe555e8..8585abadac1f 100644 --- a/crates/resolver-tests/src/lib.rs +++ b/crates/resolver-tests/src/lib.rs @@ -112,7 +112,7 @@ pub fn resolve_with_config_raw( for summary in self.list.iter() { let matched = match kind { QueryKind::Exact => dep.matches(summary), - QueryKind::Fuzzy => true, + QueryKind::Alternatives => true, QueryKind::Normalized => true, }; if matched { diff --git a/src/cargo/core/resolver/errors.rs b/src/cargo/core/resolver/errors.rs index 4ecce02b5f09..ed981ebe37ff 100644 --- a/src/cargo/core/resolver/errors.rs +++ b/src/cargo/core/resolver/errors.rs @@ -305,7 +305,7 @@ pub(super) fn activation_error( // Maybe the user mistyped the name? Like `dep-thing` when `Dep_Thing` // was meant. So we try asking the registry for a `fuzzy` search for suggestions. let candidates = loop { - match registry.query_vec(&new_dep, QueryKind::Fuzzy) { + match registry.query_vec(&new_dep, QueryKind::Alternatives) { Poll::Ready(Ok(candidates)) => break candidates, Poll::Ready(Err(e)) => return to_resolve_err(e), Poll::Pending => match registry.block_until_ready() { diff --git a/src/cargo/sources/directory.rs b/src/cargo/sources/directory.rs index 12f1301003d3..055b00042827 100644 --- a/src/cargo/sources/directory.rs +++ b/src/cargo/sources/directory.rs @@ -108,7 +108,7 @@ impl<'cfg> Source for DirectorySource<'cfg> { let packages = self.packages.values().map(|p| &p.0); let matches = packages.filter(|pkg| match kind { QueryKind::Exact => dep.matches(pkg.summary()), - QueryKind::Fuzzy => true, + QueryKind::Alternatives => true, QueryKind::Normalized => dep.matches(pkg.summary()), }); for summary in matches.map(|pkg| pkg.summary().clone()) { diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index 91f232cdc6f7..fb70c34bac6c 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -554,7 +554,7 @@ impl<'cfg> Source for PathSource<'cfg> { for s in self.packages.iter().map(|p| p.summary()) { let matched = match kind { QueryKind::Exact => dep.matches(s), - QueryKind::Fuzzy => true, + QueryKind::Alternatives => true, QueryKind::Normalized => dep.matches(s), }; if matched { diff --git a/src/cargo/sources/registry/mod.rs b/src/cargo/sources/registry/mod.rs index 6ce061ea5ff9..474a4279ca49 100644 --- a/src/cargo/sources/registry/mod.rs +++ b/src/cargo/sources/registry/mod.rs @@ -792,7 +792,7 @@ impl<'cfg> Source for RegistrySource<'cfg> { .query_inner(dep.package_name(), &req, &mut *self.ops, &mut |s| { let matched = match kind { QueryKind::Exact => dep.matches(s.as_summary()), - QueryKind::Fuzzy => true, + QueryKind::Alternatives => true, QueryKind::Normalized => true, }; if !matched { @@ -832,7 +832,7 @@ impl<'cfg> Source for RegistrySource<'cfg> { return Poll::Ready(Ok(())); } let mut any_pending = false; - if kind == QueryKind::Fuzzy || kind == QueryKind::Normalized { + if kind == QueryKind::Alternatives || kind == QueryKind::Normalized { // Attempt to handle misspellings by searching for a chain of related // names to the original name. The resolver will later // reject any candidates that have the wrong name, and with this it'll diff --git a/src/cargo/sources/source.rs b/src/cargo/sources/source.rs index 016be1423e5b..eac6e49c32e9 100644 --- a/src/cargo/sources/source.rs +++ b/src/cargo/sources/source.rs @@ -179,7 +179,7 @@ pub enum QueryKind { /// Path/Git sources may return all dependencies that are at that URI, /// whereas an `Registry` source may return dependencies that have the same /// canonicalization. - Fuzzy, + Alternatives, /// Match a denpendency in all ways and will normalize the package name. /// Each source defines what normalizing means. Normalized,