mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-07-02 11:27:22 +00:00
Merge branch 'v0.6.x'
This commit is contained in:
+1
-1
@@ -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 }
|
||||
|
||||
@@ -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))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user