Merge branch 'v0.6.x'

This commit is contained in:
Erick Tryzelaar
2016-01-18 13:09:31 -08:00
5 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -17,5 +17,5 @@ num-impls = ["num-bigint", "num-complex", "num-rational"]
num-rational = ["num/rational"]
[dependencies]
clippy = { version = "^0.0.35", optional = true }
clippy = { version = "^0.0.36", optional = true }
num = { version = "^0.1.27", default-features = false }
+3 -1
View File
@@ -154,7 +154,9 @@ impl<
fn visit_str<E>(&mut self, v: &str) -> Result<T, E>
where E: Error,
{
str::FromStr::from_str(v.trim()).or(Err(Error::type_mismatch(Type::Str)))
str::FromStr::from_str(v.trim()).or_else(|_| {
Err(Error::type_mismatch(Type::Str))
})
}
}