Skip to content

Commit 526fd27

Browse files
eduardosmAmanieu
authored andcommitted
Fuse multiple str::replace invocations into a single one
1 parent 3eb49e7 commit 526fd27

File tree

1 file changed

+1
-3
lines changed
  • crates/assert-instr-macro/src

1 file changed

+1
-3
lines changed

crates/assert-instr-macro/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ pub fn assert_instr(
6161
}
6262

6363
let instr_str = instr
64-
.replace('.', "_")
65-
.replace('/', "_")
66-
.replace(':', "_")
64+
.replace(['.', '/', ':'], "_")
6765
.replace(char::is_whitespace, "");
6866
let assert_name = syn::Ident::new(&format!("assert_{name}_{instr_str}"), name.span());
6967
// These name has to be unique enough for us to find it in the disassembly later on:

0 commit comments

Comments
 (0)