File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 11#![ allow(
22 clippy:: blocks_in_if_conditions,
33 clippy:: cast_possible_truncation,
4- clippy:: filter_map_next,
54 clippy:: map_unwrap_or,
65 clippy:: needless_pass_by_value,
76 clippy:: option_if_let_else,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ impl Struct<'_> {
2323 "#[error(transparent)] requires exactly one field" ,
2424 ) ) ;
2525 }
26- if let Some ( source) = self . fields . iter ( ) . filter_map ( |f| f. attrs . source ) . next ( ) {
26+ if let Some ( source) = self . fields . iter ( ) . find_map ( |f| f. attrs . source ) {
2727 return Err ( Error :: new_spanned (
2828 source,
2929 "transparent error struct can't contain #[source]" ,
@@ -78,7 +78,7 @@ impl Variant<'_> {
7878 "#[error(transparent)] requires exactly one field" ,
7979 ) ) ;
8080 }
81- if let Some ( source) = self . fields . iter ( ) . filter_map ( |f| f. attrs . source ) . next ( ) {
81+ if let Some ( source) = self . fields . iter ( ) . find_map ( |f| f. attrs . source ) {
8282 return Err ( Error :: new_spanned (
8383 source,
8484 "transparent variant can't contain #[source]" ,
You can’t perform that action at this time.
0 commit comments