mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Clippy changes
This commit is contained in:
parent
21f70a7293
commit
6b4ec73b7e
6 changed files with 21 additions and 26 deletions
|
@ -240,10 +240,10 @@ impl Module {
|
|||
}
|
||||
|
||||
pub fn path_to_root(self, db: &impl HirDatabase) -> Vec<Module> {
|
||||
let mut res = vec![self.clone()];
|
||||
let mut curr = self.clone();
|
||||
let mut res = vec![self];
|
||||
let mut curr = self;
|
||||
while let Some(next) = curr.parent(db) {
|
||||
res.push(next.clone());
|
||||
res.push(next);
|
||||
curr = next
|
||||
}
|
||||
res
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue