diff --git a/serde/Cargo.toml b/serde/Cargo.toml index 97d8287d..db038a64 100644 --- a/serde/Cargo.toml +++ b/serde/Cargo.toml @@ -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 } diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index f0e184ed..acd0a033 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -154,7 +154,9 @@ impl< fn visit_str(&mut self, v: &str) -> Result 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)) + }) } } diff --git a/serde_codegen/Cargo.toml b/serde_codegen/Cargo.toml index 072e440a..1ac73b7e 100644 --- a/serde_codegen/Cargo.toml +++ b/serde_codegen/Cargo.toml @@ -20,7 +20,7 @@ syntex = { version = "^0.26.0", optional = true } [dependencies] aster = { version = "^0.10.0", default-features = false } -clippy = { version = "^0.0.35", optional = true } +clippy = { version = "^0.0.36", optional = true } quasi = { version = "^0.4.0", default-features = false } quasi_macros = { version = "^0.4.0", optional = true } syntex = { version = "^0.26.0", optional = true } diff --git a/serde_macros/Cargo.toml b/serde_macros/Cargo.toml index 8845c072..b2ff3db9 100644 --- a/serde_macros/Cargo.toml +++ b/serde_macros/Cargo.toml @@ -13,7 +13,7 @@ name = "serde_macros" plugin = true [dependencies] -clippy = "^0.0.35" +clippy = "^0.0.36" serde_codegen = { version = "*", path = "../serde_codegen", default-features = false, features = ["nightly"] } [dev-dependencies] diff --git a/serde_tests/Cargo.toml b/serde_tests/Cargo.toml index 16f8d75b..64eef6b5 100644 --- a/serde_tests/Cargo.toml +++ b/serde_tests/Cargo.toml @@ -25,7 +25,7 @@ serde = { version = "*", path = "../serde", features = ["num-impls"] } syntex = "^0.26.0" [dependencies] -clippy = { version = "^0.0.35", optional = true } +clippy = { version = "^0.0.36", optional = true } [[test]] name = "test"