Skip to content

Commit

Permalink
fix clippy is_some
Browse files Browse the repository at this point in the history
  • Loading branch information
vobradovich committed May 16, 2024
1 parent cfcf92f commit f23fac0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion macros/core/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion macros/core/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f23fac0

Please sign in to comment.