Merge pull request #1492 from thomaseizinger/1491-clippy-warning

Don't generate code with redundant closures
This commit is contained in:
David Tolnay 2019-02-28 16:35:59 -08:00 committed by GitHub
commit 94f152730c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2476,7 +2476,7 @@ fn deserialize_map(
let collected_deny_unknown_fields = if cattrs.has_flatten() && cattrs.deny_unknown_fields() {
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() {
return _serde::export::Err(
_serde::de::Error::custom(format_args!("unknown field `{}`", &__key)));