Fix miscellaneous Clippy lints
This commit is contained in:
@@ -161,7 +161,7 @@ impl fmt::Display for Subtree {
|
||||
};
|
||||
f.write_str(l)?;
|
||||
let mut needs_space = false;
|
||||
for tt in self.token_trees.iter() {
|
||||
for tt in &self.token_trees {
|
||||
if needs_space {
|
||||
f.write_str(" ")?;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ impl Subtree {
|
||||
.iter()
|
||||
.map(|c| match c {
|
||||
TokenTree::Subtree(c) => c.count(),
|
||||
_ => 0,
|
||||
TokenTree::Leaf(_) => 0,
|
||||
})
|
||||
.sum::<usize>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user