Housekeeping with clippy

This commit is contained in:
Rerumu
2023-06-20 14:07:25 -04:00
parent 857737ff52
commit 7a49d61e0a
13 changed files with 96 additions and 117 deletions
+3 -4
View File
@@ -125,17 +125,16 @@ impl DriverNoContext for BinOp {
write!(w, "(")?;
self.lhs().write(w)?;
write!(w, " {symbol} ")?;
self.rhs().write(w)?;
write!(w, ")")
} else {
let (head, tail) = self.op_type().as_name();
write!(w, "{head}_{tail}(")?;
self.lhs().write(w)?;
write!(w, ", ")?;
self.rhs().write(w)?;
write!(w, ")")
}
self.rhs().write(w)?;
write!(w, ")")
}
}
+1 -1
View File
@@ -61,7 +61,7 @@ impl Manager {
self.label_list.pop().unwrap();
}
pub fn indentation(&self) -> usize {
pub const fn indentation(&self) -> usize {
self.indentation
}
+1 -1
View File
@@ -27,7 +27,7 @@ impl Driver for Br {
}
if self.target() == 0 {
if let Some(Some(LabelType::Backward)) = mng.label_list().last() {
if mng.label_list().last() == Some(&Some(LabelType::Backward)) {
line!(mng, w, "continue")
} else {
line!(mng, w, "break")