Clippy changes

This commit is contained in:
Jeremy Kolb 2019-07-04 22:59:28 -04:00
parent 21f70a7293
commit 6b4ec73b7e
6 changed files with 21 additions and 26 deletions

View file

@ -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