Minify mapping
This commit is contained in:
parent
eff4f547ba
commit
e35d78fedb
1 changed files with 3 additions and 3 deletions
|
@ -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)) }
|
||||
|
|
Loading…
Reference in a new issue