From f23fac01302fb43b8befc4185c41209fdceef752 Mon Sep 17 00:00:00 2001 From: vobradovich Date: Thu, 16 May 2024 12:11:03 +0200 Subject: [PATCH] fix clippy is_some --- macros/core/src/program.rs | 2 +- macros/core/src/service.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/core/src/program.rs b/macros/core/src/program.rs index f190d307..87d4a1d4 100644 --- a/macros/core/src/program.rs +++ b/macros/core/src/program.rs @@ -17,7 +17,7 @@ pub fn gprogram(program_impl_tokens: TokenStream2) -> TokenStream2 { err ) }); - if let Some(_) = unsafe { shared::PROGRAM_SPAN } { + if unsafe { shared::PROGRAM_SPAN }.is_some() { abort!( program_impl.span(), "multiple `gprogram` attributes are not allowed" diff --git a/macros/core/src/service.rs b/macros/core/src/service.rs index 1b04caf6..66a55daf 100644 --- a/macros/core/src/service.rs +++ b/macros/core/src/service.rs @@ -41,7 +41,7 @@ pub fn gservice(service_impl_tokens: TokenStream2) -> TokenStream2 { let path = shared::impl_type_path(&service_impl); let type_ident = path.path.segments.last().unwrap().ident.to_string(); - if let Some(_) = unsafe { shared::SERVICE_TYPES.get(&type_ident) } { + if unsafe { shared::SERVICE_TYPES.get(&type_ident) }.is_some() { abort!( service_impl.span(), "multiple `gservice` attributes are not allowed"