From b77cc7e96f5da9f3713b3044376b980251e9aa2f Mon Sep 17 00:00:00 2001 From: vobradovich Date: Mon, 20 May 2024 14:56:38 +0200 Subject: [PATCH] fix clippy --- macros/core/src/service.rs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/macros/core/src/service.rs b/macros/core/src/service.rs index 3aeef489..f361e47e 100644 --- a/macros/core/src/service.rs +++ b/macros/core/src/service.rs @@ -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,