mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-31 23:49:54 +00:00
Merge branch 'v0.6.x'
This commit is contained in:
commit
d1e39db61e
5 files changed
+7
-5
No files matched your search
+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