File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,20 +20,20 @@ pub trait Source: Debug {
20
20
/// Collects all configuration properties to a provided cache.
21
21
fn collect_to ( & self , cache : & mut Value ) -> Result < ( ) > {
22
22
self . collect ( ) ?
23
- . iter ( )
23
+ . into_iter ( )
24
24
. for_each ( |( key, val) | set_value ( cache, key, val) ) ;
25
25
26
26
Ok ( ( ) )
27
27
}
28
28
}
29
29
30
- fn set_value ( cache : & mut Value , key : & str , value : & Value ) {
31
- match path:: Expression :: from_str ( key) {
30
+ fn set_value ( cache : & mut Value , key : String , value : Value ) {
31
+ match path:: Expression :: from_str ( key. as_str ( ) ) {
32
32
// Set using the path
33
- Ok ( expr) => expr. set ( cache, value. clone ( ) ) ,
33
+ Ok ( expr) => expr. set ( cache, value) ,
34
34
35
35
// Set directly anyway
36
- _ => path:: Expression :: root ( key. to_owned ( ) ) . set ( cache, value. clone ( ) ) ,
36
+ _ => path:: Expression :: root ( key) . set ( cache, value) ,
37
37
}
38
38
}
39
39
@@ -64,7 +64,7 @@ pub trait AsyncSource: Debug + Sync {
64
64
async fn collect_to ( & self , cache : & mut Value ) -> Result < ( ) > {
65
65
self . collect ( )
66
66
. await ?
67
- . iter ( )
67
+ . into_iter ( )
68
68
. for_each ( |( key, val) | set_value ( cache, key, val) ) ;
69
69
70
70
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments