Merge pull request #1492 from thomaseizinger/1491-clippy-warning
Don't generate code with redundant closures
This commit is contained in:
commit
94f152730c
@ -2476,7 +2476,7 @@ fn deserialize_map(
|
|||||||
|
|
||||||
let collected_deny_unknown_fields = if cattrs.has_flatten() && cattrs.deny_unknown_fields() {
|
let collected_deny_unknown_fields = if cattrs.has_flatten() && cattrs.deny_unknown_fields() {
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
if let _serde::export::Some(_serde::export::Some((__key, _))) = __collect.into_iter().filter(|x| x.is_some()).next() {
|
if let _serde::export::Some(_serde::export::Some((__key, _))) = __collect.into_iter().filter(Option::is_some).next() {
|
||||||
if let _serde::export::Some(__key) = __key.as_str() {
|
if let _serde::export::Some(__key) = __key.as_str() {
|
||||||
return _serde::export::Err(
|
return _serde::export::Err(
|
||||||
_serde::de::Error::custom(format_args!("unknown field `{}`", &__key)));
|
_serde::de::Error::custom(format_args!("unknown field `{}`", &__key)));
|
||||||
|
Loading…
Reference in New Issue
Block a user