Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
cakevm committed Jan 10, 2025
1 parent 78f4568 commit 81587d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/codegen/src/irgen/arg_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn bubble_arg_call(
if let Some(macro_invoc) = mis.last() {
// Literal, Ident & Arg Call Check
// First get this arg_nam position in the macro definition params
if let Some(pos) = macro_def.parameters.iter().position(|r| r.name.as_ref().map_or(false, |s| s.eq(arg_name))) {
if let Some(pos) = macro_def.parameters.iter().position(|r| r.name.as_ref().is_some_and(|s| s.eq(arg_name))) {
tracing::info!(target: "codegen", "GOT \"{}\" POS IN ARG LIST: {}", arg_name, pos);

if let Some(arg) = macro_invoc.1.args.get(pos) {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/tests/parser_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fn test_invalid_token_in_label_definition() {
fn test_invalid_single_arg() {
for _ in 0..10_000 {
let random_char = rand::random::<u8>() as char;
if random_char.is_numeric() || !random_char.is_alphabetic() || random_char.to_string().as_bytes().len() > 1 {
if random_char.is_numeric() || !random_char.is_alphabetic() || random_char.to_string().len() > 1 {
continue;
}
let source = &format!("#define macro CONSTANT() = takes ({random_char}) returns (0) {{}}");
Expand Down

0 comments on commit 81587d7

Please sign in to comment.