1
0
Fork 0
forked from wry/wry

all: fix clippy warnings

This commit is contained in:
Julian Orth 2025-07-01 09:31:21 +02:00
parent 70912b47e4
commit 64664ca76e
5 changed files with 6 additions and 9 deletions

View file

@ -304,7 +304,7 @@ impl Display for Mode {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{} x {}", self.width, self.height)?;
if let Some(rr) = self.refresh_rate {
write!(f, " @ {}", rr)?;
write!(f, " @ {rr}")?;
}
Ok(())
}

View file

@ -34,12 +34,12 @@ impl<E: Error> Display for SpannedError<'_, E> {
if let Some(cause) = &self.cause {
write!(f, "{}: ", Report::new(cause))?;
}
writeln!(f, "At line {}, column {}:", line_num, col_num)?;
writeln!(f, "At line {line_num}, column {col_num}:")?;
for _ in 0..=gutter {
write!(f, " ")?;
}
writeln!(f, "|")?;
write!(f, "{} | ", line_num)?;
write!(f, "{line_num} | ")?;
writeln!(f, "{}", content.as_bstr())?;
for _ in 0..=gutter {
write!(f, " ")?;

View file

@ -184,7 +184,7 @@ impl<'a> Parser<'a, '_> {
if let Ok(n) = u32::from_str_radix(s, 16) {
if let Some(c) = char::from_u32(n) {
pos += len;
let _ = write!(res, "{}", c);
let _ = write!(res, "{c}");
break 'unicode;
}
}