all: fix clippy warnings
This commit is contained in:
parent
70912b47e4
commit
64664ca76e
5 changed files with 6 additions and 9 deletions
|
|
@ -749,10 +749,7 @@ impl Input {
|
|||
println!("{prefix}{}:", device.id);
|
||||
println!("{prefix} name: {}", device.name);
|
||||
if print_seat {
|
||||
let seat = match device.seat.as_deref() {
|
||||
Some(s) => s,
|
||||
_ => "<detached>",
|
||||
};
|
||||
let seat = device.seat.as_deref().unwrap_or("<detached>");
|
||||
println!("{prefix} seat: {}", seat);
|
||||
}
|
||||
if let Some(v) = &device.syspath {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ impl ClientMem {
|
|||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
unsafe { (*self.data).len() }
|
||||
self.data.len()
|
||||
}
|
||||
|
||||
pub fn offset(self: &Rc<Self>, offset: usize) -> ClientMemOffset {
|
||||
|
|
|
|||
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, " ")?;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue