Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
vobradovich committed May 20, 2024
1 parent 024482e commit b77cc7e
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions macros/core/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,14 @@ fn parse_gservice_impl(service_impl_tokens: TokenStream2) -> ItemImpl {
}

fn ensure_single_gservice_on_impl(service_impl: &ItemImpl) {
let attr_gservice = service_impl
.attrs
.iter()
.filter(|attr| {
attr.meta
.path()
.segments
.last()
.map(|s| s.ident == "gservice")
.unwrap_or(false)
})
.next();
let attr_gservice = service_impl.attrs.iter().find(|attr| {
attr.meta
.path()
.segments
.last()
.map(|s| s.ident == "gservice")
.unwrap_or(false)
});
if attr_gservice.is_some() {
abort!(
service_impl,
Expand Down

0 comments on commit b77cc7e

Please sign in to comment.