Skip to content

Commit 676ec94

Browse files
Deduplicate 0x prefix stripping in cast::concat_hex by using strip_0x (#12328)
Update lib.rs Co-authored-by: grandizzy <[email protected]>
1 parent 4cd6ad4 commit 676ec94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/cast/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ impl SimpleCast {
13731373
let mut out = String::new();
13741374
for s in values {
13751375
let s = s.as_ref();
1376-
out.push_str(s.strip_prefix("0x").unwrap_or(s))
1376+
out.push_str(strip_0x(s))
13771377
}
13781378
format!("0x{out}")
13791379
}

0 commit comments

Comments
 (0)