Avoid an allocation in rewrite_int_lit

This commit is contained in:
Mattias Wallin 2024-09-14 20:25:30 +02:00 committed by Yacin Tmimi
parent 008b3df97d
commit b552eb9e3a

View File

@ -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,