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(
2424) -> Value {
2525 let mut map = Map :: < String , Value > :: new ( ) ;
2626
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) | {
3030 let key = k. to_owned ( ) ;
3131 let value = Value :: new ( uri, ValueKind :: String ( v. to_owned ( ) ) ) ;
3232 ( key, value)
33- } ) . collect ( )
34- ) } ) . collect ( ) ;
33+ } ) . collect ( ) ;
34+ ( key, value)
35+ } ) . collect ( ) ;
3536
3637 // Hoist (optional) sectionless properties to the top-level, alongside sections:
3738 map. extend ( sections. remove ( & None ) . unwrap_or_default ( ) ) ;
You can’t perform that action at this time.
0 commit comments