Minify mapping

This commit is contained in:
Matthias Beyer 2017-06-03 14:48:53 +02:00
parent eff4f547ba
commit e35d78fedb

View file

@ -166,8 +166,8 @@ fn into_value(value: Value, s: String) -> Option<Value> {
match value {
Value::String(_) => Some(Value::String(s)),
Value::Integer(_) => FromStr::from_str(&s[..]).ok().map(|i| Value::Integer(i)),
Value::Float(_) => FromStr::from_str(&s[..]).ok().map(|f| Value::Float(f)),
Value::Integer(_) => FromStr::from_str(&s[..]).ok().map(Value::Integer),
Value::Float(_) => FromStr::from_str(&s[..]).ok().map(Value::Float),
Value::Boolean(_) => {
if s == "true" { Some(Value::Boolean(true)) }
else if s == "false" { Some(Value::Boolean(false)) }