File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 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 {
2020 /// Collects all configuration properties to a provided cache.
2121 fn collect_to ( & self , cache : & mut Value ) -> Result < ( ) > {
2222 self . collect ( ) ?
23- . iter ( )
23+ . into_iter ( )
2424 . for_each ( |( key, val) | set_value ( cache, key, val) ) ;
2525
2626 Ok ( ( ) )
2727 }
2828}
2929
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 ( ) ) {
3232 // Set using the path
33- Ok ( expr) => expr. set ( cache, value. clone ( ) ) ,
33+ Ok ( expr) => expr. set ( cache, value) ,
3434
3535 // Set directly anyway
36- _ => path:: Expression :: root ( key. to_owned ( ) ) . set ( cache, value. clone ( ) ) ,
36+ _ => path:: Expression :: root ( key) . set ( cache, value) ,
3737 }
3838}
3939
@@ -64,7 +64,7 @@ pub trait AsyncSource: Debug + Sync {
6464 async fn collect_to ( & self , cache : & mut Value ) -> Result < ( ) > {
6565 self . collect ( )
6666 . await ?
67- . iter ( )
67+ . into_iter ( )
6868 . for_each ( |( key, val) | set_value ( cache, key, val) ) ;
6969
7070 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments