Skip to content

Commit

Permalink
Avoid an allocation in rewrite_int_lit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawk authored and ytmimi committed Sep 17, 2024
1 parent 008b3df commit b552eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ fn rewrite_int_lit(
format!(
"0x{}{}",
hex_lit,
token_lit.suffix.map_or(String::new(), |s| s.to_string())
token_lit.suffix.as_ref().map_or("", |s| s.as_str())
),
context.config.max_width(),
shape,
Expand Down

0 comments on commit b552eb9

Please sign in to comment.