We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ace2cd commit ff60fb6Copy full SHA for ff60fb6
src/file/format/ini.rs
@@ -24,14 +24,15 @@ fn from_ini(
24
) -> Value {
25
let mut map = Map::<String, Value>::new();
26
27
- let mut sections: Map<Option<&str>, Table> = data.into_iter().map(|(section, props)| {(
28
- section,
29
- props.iter().map(|(k, v)| {
+ let mut sections: Map<Option<&str>, Table> = data.into_iter().map(|(section, props)| {
+ let key = section;
+ let value = props.iter().map(|(k, v)| {
30
let key = k.to_owned();
31
let value = Value::new(uri, ValueKind::String(v.to_owned()));
32
(key, value)
33
- }).collect()
34
- )}).collect();
+ }).collect();
+ (key, value)
35
36
37
// Hoist (optional) sectionless properties to the top-level, alongside sections:
38
map.extend(sections.remove(&None).unwrap_or_default());
0 commit comments