diff options
author | Alan Du <[email protected]> | 2019-06-04 08:07:57 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | 02b6f871f174f510cd258c5064dcbe08cadd11d3 (patch) | |
tree | ff75a4079e7059168a2acc70966a9f00ec21f437 | |
parent | 9b54b06ee3867cf632434b9cbb06d64d0d739cff (diff) |
Fix clippy::iter_cloned_collect
-rw-r--r-- | crates/ra_hir/src/nameres.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index c59c30579..8b798d6c9 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs | |||
@@ -422,10 +422,8 @@ impl CrateDefMap { | |||
422 | curr_per_ns = match curr { | 422 | curr_per_ns = match curr { |
423 | ModuleDef::Module(module) => { | 423 | ModuleDef::Module(module) => { |
424 | if module.krate != self.krate { | 424 | if module.krate != self.krate { |
425 | let path = Path { | 425 | let path = |
426 | segments: path.segments[i..].iter().cloned().collect(), | 426 | Path { segments: path.segments[i..].to_vec(), kind: PathKind::Self_ }; |
427 | kind: PathKind::Self_, | ||
428 | }; | ||
429 | log::debug!("resolving {:?} in other crate", path); | 427 | log::debug!("resolving {:?} in other crate", path); |
430 | let defp_map = db.crate_def_map(module.krate); | 428 | let defp_map = db.crate_def_map(module.krate); |
431 | let (def, s) = | 429 | let (def, s) = |