style: simplify string interpolation

This commit is contained in:
Hamir Mahal 2024-05-30 16:18:49 -07:00
parent b32f181f47
commit 7c34eb3880
No known key found for this signature in database
43 changed files with 71 additions and 78 deletions

View file

@ -2414,9 +2414,9 @@ impl Const {
let value_signed =
i128::from_le_bytes(mir::pad16(b, matches!(s, Scalar::Int(_))));
if value >= 10 {
return Ok(format!("{} ({:#X})", value_signed, value));
return Ok(format!("{value_signed} ({value:#X})"));
} else {
return Ok(format!("{}", value_signed));
return Ok(format!("{value_signed}"));
}
}
}