Skip to content

Commit

Permalink
cargo clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Oct 18, 2022
1 parent 7fb8304 commit 2bc7c8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub fn ctor(_attribute: TokenStream, function: TokenStream) -> TokenStream {
..
} = var;

if let Some(_) = mutability {
if mutability.is_some() {
panic!("#[ctor]-annotated static objects must not be mutable");
}

Expand Down Expand Up @@ -383,7 +383,7 @@ fn validate_item(typ: &str, item: &syn::ItemFn) {
}

// No parameters allowed
if sig.inputs.len() > 0 {
if !sig.inputs.is_empty() {
panic!("#[{}] methods may not have parameters", typ);
}

Expand Down

0 comments on commit 2bc7c8c

Please sign in to comment.