File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,15 @@ fn from_ini(
24
24
) -> Value {
25
25
let mut map = Map :: < String , Value > :: new ( ) ;
26
26
27
- let mut sections: Map < Option < & str > , Table > = data. into_iter ( ) . map ( |( section, props) | { (
28
- section,
29
- props. iter ( ) . map ( |( k, v) | {
27
+ let mut sections: Map < Option < & str > , Table > = data. into_iter ( ) . map ( |( section, props) | {
28
+ let key = section;
29
+ let value = props. iter ( ) . map ( |( k, v) | {
30
30
let key = k. to_owned ( ) ;
31
31
let value = Value :: new ( uri, ValueKind :: String ( v. to_owned ( ) ) ) ;
32
32
( key, value)
33
- } ) . collect ( )
34
- ) } ) . collect ( ) ;
33
+ } ) . collect ( ) ;
34
+ ( key, value)
35
+ } ) . collect ( ) ;
35
36
36
37
// Hoist (optional) sectionless properties to the top-level, alongside sections:
37
38
map. extend ( sections. remove ( & None ) . unwrap_or_default ( ) ) ;
You can’t perform that action at this time.
0 commit comments