Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dewert99 committed Jun 19, 2024
1 parent 3f4b213 commit 3915bcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions ambassador/src/delegate_shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ pub(super) fn delegate_macro<I>(
}

let iter = delegate_attributes.map(|attr| delegate_single(input, attr));
let res = iter
.map(|x| x.unwrap_or_else(|err| err.to_compile_error()))
.flatten()
.collect();
res
iter.flat_map(|x| x.unwrap_or_else(|err| err.to_compile_error()))
.collect()
}

pub(super) fn trait_info(trait_path_full: &syn::Path) -> Result<(&Ident, impl ToTokens + '_)> {
Expand Down
2 changes: 1 addition & 1 deletion ambassador/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ fn delegate_single_attr(
(trg, SingleFieldStruct {field_ident, field_type}) => {
match trg {
Field(f) if f != field_ident => {
unknown_field(&f)?;
unknown_field(f)?;
}
_ => {}
}
Expand Down

0 comments on commit 3915bcd

Please sign in to comment.