mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykril
style: simplify string interpolation
This commit is contained in:
commit
cb6b808185
43 changed files with 71 additions and 79 deletions
|
@ -2422,9 +2422,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}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue