From e35d78fedb629c8fb54e4f3bd272ce6ae138f4aa Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 3 Jun 2017 14:48:53 +0200 Subject: [PATCH] Minify mapping --- libimagrt/src/configuration.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libimagrt/src/configuration.rs b/libimagrt/src/configuration.rs index f1656059..96d32010 100644 --- a/libimagrt/src/configuration.rs +++ b/libimagrt/src/configuration.rs @@ -165,9 +165,9 @@ fn into_value(value: Value, s: String) -> Option { use std::str::FromStr; 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::String(_) => Some(Value::String(s)), + 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)) }