summaryrefslogtreecommitdiffstats
path: root/src/file/format/ini.rs
diff options
context:
space:
mode:
authorRyan Leckey <leckey.ryan@gmail.com>2018-07-02 15:33:38 -0700
committerRyan Leckey <leckey.ryan@gmail.com>2018-07-02 15:33:38 -0700
commitcbb9ef88ea6f6452614dd8bbffce7203b1358a55 (patch)
treefd4f67587f9a36c517a3a3f1ff7ef727697d5fef /src/file/format/ini.rs
parentbbc78d85610dec79aa4af4dd360131c7880efb5f (diff)
Run rustfmt (nightly)
Diffstat (limited to 'src/file/format/ini.rs')
-rw-r--r--src/file/format/ini.rs19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/file/format/ini.rs b/src/file/format/ini.rs
index b7c0f71..b4b4ada 100644
--- a/src/file/format/ini.rs
+++ b/src/file/format/ini.rs
@@ -1,8 +1,8 @@
+use ini::Ini;
use source::Source;
use std::collections::HashMap;
use std::error::Error;
use value::{Value, ValueKind};
-use ini::Ini;
pub fn parse(
uri: Option<&String>,
@@ -15,15 +15,22 @@ pub fn parse(
Some(ref sec) => {
let mut sec_map: HashMap<String, Value> = HashMap::new();
for (k, v) in prop.iter() {
- sec_map.insert(k.to_lowercase().clone(),
- Value::new(uri, ValueKind::String(v.clone())));
+ sec_map.insert(
+ k.to_lowercase().clone(),
+ Value::new(uri, ValueKind::String(v.clone())),
+ );
}
- map.insert(sec.to_lowercase().clone(), Value::new(uri, ValueKind::Table(sec_map)));
+ map.insert(
+ sec.to_lowercase().clone(),
+ Value::new(uri, ValueKind::Table(sec_map)),
+ );
}
None => {
for (k, v) in prop.iter() {
- map.insert(k.to_lowercase().clone(),
- Value::new(uri, ValueKind::String(v.clone())));
+ map.insert(
+ k.to_lowercase().clone(),
+ Value::new(uri, ValueKind::String(v.clone())),
+ );
}
}
}