Use variable interpolation for println!.

This commit is contained in:
Stephen Chung
2022-10-27 13:38:21 +08:00
parent 6b24cc151e
commit 3c2e031883
24 changed files with 132 additions and 150 deletions

View File

@@ -185,8 +185,8 @@ impl fmt::Debug for RangeCase {
#[inline(never)]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::ExclusiveInt(r, n) => write!(f, "{}..{} => {}", r.start, r.end, n),
Self::InclusiveInt(r, n) => write!(f, "{}..={} => {}", *r.start(), *r.end(), n),
Self::ExclusiveInt(r, n) => write!(f, "{}..{} => {n}", r.start, r.end),
Self::InclusiveInt(r, n) => write!(f, "{}..={} => {n}", *r.start(), *r.end()),
}
}
}