diff options
author | Ryan Leckey <ryan@launchbadge.com> | 2019-12-07 18:14:13 -0800 |
---|---|---|
committer | Ryan Leckey <ryan@launchbadge.com> | 2019-12-07 18:14:13 -0800 |
commit | 8fb71a3051c0c09f37129d9c1884c778a4ea4cea (patch) | |
tree | 39e5f98f19b0633314ed9aca750e6b0263bf19a6 /src/file | |
parent | 51ae442e74f0a9d99707a5887afa9159985ad104 (diff) |
Remove automatic lowercase
Diffstat (limited to 'src/file')
-rw-r--r-- | src/file/format/hjson.rs | 2 | ||||
-rw-r--r-- | src/file/format/ini.rs | 6 | ||||
-rw-r--r-- | src/file/format/json.rs | 2 | ||||
-rw-r--r-- | src/file/format/toml.rs | 2 | ||||
-rw-r--r-- | src/file/format/yaml.rs | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/file/format/hjson.rs b/src/file/format/hjson.rs index bb21e38..cb0a064 100644 --- a/src/file/format/hjson.rs +++ b/src/file/format/hjson.rs @@ -34,7 +34,7 @@ fn from_hjson_value(uri: Option<&String>, value: &serde_hjson::Value) -> Value { let mut m = HashMap::new(); for (key, value) in table { - m.insert(key.to_lowercase().clone(), from_hjson_value(uri, value)); + m.insert(key.clone(), from_hjson_value(uri, value)); } Value::new(uri, ValueKind::Table(m)) diff --git a/src/file/format/ini.rs b/src/file/format/ini.rs index b4b4ada..845de3a 100644 --- a/src/file/format/ini.rs +++ b/src/file/format/ini.rs @@ -16,19 +16,19 @@ pub fn parse( let mut sec_map: HashMap<String, Value> = HashMap::new(); for (k, v) in prop.iter() { sec_map.insert( - k.to_lowercase().clone(), + k.clone(), Value::new(uri, ValueKind::String(v.clone())), ); } map.insert( - sec.to_lowercase().clone(), + sec.clone(), Value::new(uri, ValueKind::Table(sec_map)), ); } None => { for (k, v) in prop.iter() { map.insert( - k.to_lowercase().clone(), + k.clone(), Value::new(uri, ValueKind::String(v.clone())), ); } diff --git a/src/file/format/json.rs b/src/file/format/json.rs index caf62f5..87240a3 100644 --- a/src/file/format/json.rs +++ b/src/file/format/json.rs @@ -36,7 +36,7 @@ fn from_json_value(uri: Option<&String>, value: &serde_json::Value) -> Value { let mut m = HashMap::new(); for (key, value) in table { - m.insert(key.to_lowercase().clone(), from_json_value(uri, value)); + m.insert(key.clone(), from_json_value(uri, value)); } Value::new(uri, ValueKind::Table(m)) diff --git a/src/file/format/toml.rs b/src/file/format/toml.rs index da7782f..26dcb2a 100644 --- a/src/file/format/toml.rs +++ b/src/file/format/toml.rs @@ -29,7 +29,7 @@ fn from_toml_value(uri: Option<&String>, value: &toml::Value) -> Value { let mut m = HashMap::new(); for (key, value) in table { - m.insert(key.to_lowercase().clone(), from_toml_value(uri, value)); + m.insert(key.clone(), from_toml_value(uri, value)); } Value::new(uri, m) diff --git a/src/file/format/yaml.rs b/src/file/format/yaml.rs index 5ec8ca6..c2b26cb 100644 --- a/src/file/format/yaml.rs +++ b/src/file/format/yaml.rs @@ -42,7 +42,7 @@ fn from_yaml_value(uri: Option<&String>, value: &yaml::Yaml) -> Value { let mut m = HashMap::new(); for (key, value) in table { if let Some(k) = key.as_str() { - m.insert(k.to_lowercase().to_owned(), from_yaml_value(uri, value)); + m.insert(k.to_owned(), from_yaml_value(uri, value)); } // TODO: should we do anything for non-string keys? } |