Skip to content

Commit 6cd9c86

Browse files
authored
Merge pull request #19805 from lnicola/inline-format-args
minor: Inline some format args
2 parents cab3b58 + 7efb73f commit 6cd9c86

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/tt/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,12 @@ impl<S> Literal<S> {
825825
let symbol =
826826
self.0.symbol.as_str().strip_prefix('-').unwrap_or(self.0.symbol.as_str());
827827
match self.0.kind {
828-
LitKind::Byte => write!(f, "b'{}'", symbol),
829-
LitKind::Char => write!(f, "'{}'", symbol),
830-
LitKind::Integer | LitKind::Float | LitKind::Err(_) => write!(f, "{}", symbol),
831-
LitKind::Str => write!(f, "\"{}\"", symbol),
832-
LitKind::ByteStr => write!(f, "b\"{}\"", symbol),
833-
LitKind::CStr => write!(f, "c\"{}\"", symbol),
828+
LitKind::Byte => write!(f, "b'{symbol}'"),
829+
LitKind::Char => write!(f, "'{symbol}'"),
830+
LitKind::Integer | LitKind::Float | LitKind::Err(_) => write!(f, "{symbol}"),
831+
LitKind::Str => write!(f, "\"{symbol}\""),
832+
LitKind::ByteStr => write!(f, "b\"{symbol}\""),
833+
LitKind::CStr => write!(f, "c\"{symbol}\""),
834834
LitKind::StrRaw(num_of_hashes) => {
835835
let num_of_hashes = num_of_hashes as usize;
836836
write!(

0 commit comments

Comments
 (0)