File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed
crates/resolver-tests/src Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ pub fn resolve_with_global_context_raw(
143
143
for summary in self . list . iter ( ) {
144
144
let matched = match kind {
145
145
QueryKind :: Exact => dep. matches ( summary) ,
146
- QueryKind :: Alternatives => true ,
146
+ QueryKind :: AlternativeNames => true ,
147
147
QueryKind :: Normalized => true ,
148
148
} ;
149
149
if matched {
Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ pub(super) fn activation_error(
304
304
// Maybe the user mistyped the name? Like `dep-thing` when `Dep_Thing`
305
305
// was meant. So we try asking the registry for a `fuzzy` search for suggestions.
306
306
let candidates = loop {
307
- match registry. query_vec ( & new_dep, QueryKind :: Alternatives ) {
307
+ match registry. query_vec ( & new_dep, QueryKind :: AlternativeNames ) {
308
308
Poll :: Ready ( Ok ( candidates) ) => break candidates,
309
309
Poll :: Ready ( Err ( e) ) => return to_resolve_err ( e) ,
310
310
Poll :: Pending => match registry. block_until_ready ( ) {
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl<'gctx> Source for DirectorySource<'gctx> {
109
109
let packages = self . packages . values ( ) . map ( |p| & p. 0 ) ;
110
110
let matches = packages. filter ( |pkg| match kind {
111
111
QueryKind :: Exact => dep. matches ( pkg. summary ( ) ) ,
112
- QueryKind :: Alternatives => true ,
112
+ QueryKind :: AlternativeNames => true ,
113
113
QueryKind :: Normalized => dep. matches ( pkg. summary ( ) ) ,
114
114
} ) ;
115
115
for summary in matches. map ( |pkg| pkg. summary ( ) . clone ( ) ) {
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ impl<'gctx> Source for PathSource<'gctx> {
146
146
if let Some ( s) = self . package . as_ref ( ) . map ( |p| p. summary ( ) ) {
147
147
let matched = match kind {
148
148
QueryKind :: Exact => dep. matches ( s) ,
149
- QueryKind :: Alternatives => true ,
149
+ QueryKind :: AlternativeNames => true ,
150
150
QueryKind :: Normalized => dep. matches ( s) ,
151
151
} ;
152
152
if matched {
@@ -333,7 +333,7 @@ impl<'gctx> Source for RecursivePathSource<'gctx> {
333
333
{
334
334
let matched = match kind {
335
335
QueryKind :: Exact => dep. matches ( s) ,
336
- QueryKind :: Alternatives => true ,
336
+ QueryKind :: AlternativeNames => true ,
337
337
QueryKind :: Normalized => dep. matches ( s) ,
338
338
} ;
339
339
if matched {
Original file line number Diff line number Diff line change @@ -804,7 +804,7 @@ impl<'gctx> Source for RegistrySource<'gctx> {
804
804
dep. matches( s. as_summary( ) )
805
805
}
806
806
}
807
- QueryKind :: Alternatives => true ,
807
+ QueryKind :: AlternativeNames => true ,
808
808
QueryKind :: Normalized => true ,
809
809
} ;
810
810
if !matched {
@@ -839,7 +839,7 @@ impl<'gctx> Source for RegistrySource<'gctx> {
839
839
return Poll :: Ready ( Ok ( ( ) ) ) ;
840
840
}
841
841
let mut any_pending = false ;
842
- if kind == QueryKind :: Alternatives || kind == QueryKind :: Normalized {
842
+ if kind == QueryKind :: AlternativeNames || kind == QueryKind :: Normalized {
843
843
// Attempt to handle misspellings by searching for a chain of related
844
844
// names to the original name. The resolver will later
845
845
// reject any candidates that have the wrong name, and with this it'll
@@ -859,7 +859,7 @@ impl<'gctx> Source for RegistrySource<'gctx> {
859
859
. query_inner ( name_permutation, & req, & mut * self . ops , & mut |s| {
860
860
if !s. is_yanked ( ) {
861
861
f ( s) ;
862
- } else if kind == QueryKind :: Alternatives {
862
+ } else if kind == QueryKind :: AlternativeNames {
863
863
f ( s) ;
864
864
}
865
865
} ) ?
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ pub enum QueryKind {
185
185
/// Path/Git sources may return all dependencies that are at that URI,
186
186
/// whereas an `Registry` source may return dependencies that have the same
187
187
/// canonicalization.
188
- Alternatives ,
188
+ AlternativeNames ,
189
189
/// Match a dependency in all ways and will normalize the package name.
190
190
/// Each source defines what normalizing means.
191
191
Normalized ,
You can’t perform that action at this time.
0 commit comments