File tree 3 files changed +7
-11
lines changed
crates/resolver-tests/src
3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,8 @@ pub fn resolve_with_config_raw(
128
128
fn query (
129
129
& mut self ,
130
130
dep : & Dependency ,
131
- f : & mut dyn FnMut ( Summary ) ,
132
131
fuzzy : bool ,
132
+ f : & mut dyn FnMut ( Summary ) ,
133
133
) -> Poll < CargoResult < ( ) > > {
134
134
for summary in self . list . iter ( ) {
135
135
if fuzzy || dep. matches ( summary) {
Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ pub trait Registry {
19
19
fn query (
20
20
& mut self ,
21
21
dep : & Dependency ,
22
- f : & mut dyn FnMut ( Summary ) ,
23
22
fuzzy : bool ,
23
+ f : & mut dyn FnMut ( Summary ) ,
24
24
) -> Poll < CargoResult < ( ) > > ;
25
25
26
26
fn query_vec ( & mut self , dep : & Dependency , fuzzy : bool ) -> Poll < CargoResult < Vec < Summary > > > {
27
27
let mut ret = Vec :: new ( ) ;
28
- self . query ( dep, & mut |s| ret. push ( s) , fuzzy )
28
+ self . query ( dep, fuzzy , & mut |s| ret. push ( s) )
29
29
. map_ok ( |( ) | ret)
30
30
}
31
31
@@ -575,8 +575,8 @@ impl<'cfg> Registry for PackageRegistry<'cfg> {
575
575
fn query (
576
576
& mut self ,
577
577
dep : & Dependency ,
578
- f : & mut dyn FnMut ( Summary ) ,
579
578
fuzzy : bool ,
579
+ f : & mut dyn FnMut ( Summary ) ,
580
580
) -> Poll < CargoResult < ( ) > > {
581
581
assert ! ( self . patches_locked) ;
582
582
let ( override_summary, n, to_warn) = {
Original file line number Diff line number Diff line change @@ -100,13 +100,9 @@ impl<'a> RegistryQueryer<'a> {
100
100
}
101
101
102
102
let mut ret = Vec :: new ( ) ;
103
- let ready = self . registry . query (
104
- dep,
105
- & mut |s| {
106
- ret. push ( s) ;
107
- } ,
108
- false ,
109
- ) ?;
103
+ let ready = self . registry . query ( dep, false , & mut |s| {
104
+ ret. push ( s) ;
105
+ } ) ?;
110
106
if ready. is_pending ( ) {
111
107
self . registry_cache . insert ( dep. clone ( ) , Poll :: Pending ) ;
112
108
return Poll :: Pending ;
You can’t perform that action at this time.
0 commit comments