mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Fix miscellaneous Clippy lints
This commit is contained in:
parent
55c0b86cde
commit
eff195852d
21 changed files with 40 additions and 51 deletions
|
@ -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>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue