From 4ad9e986ad05e404df73701c098b71f73a847ca6 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 4 Jul 2019 13:26:44 -0400 Subject: Some clippy fixes for 1.36 --- crates/ra_project_model/src/lib.rs | 2 +- crates/ra_project_model/src/sysroot.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_project_model') diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs index 74b7efa9a..08e5c1c32 100644 --- a/crates/ra_project_model/src/lib.rs +++ b/crates/ra_project_model/src/lib.rs @@ -191,7 +191,7 @@ impl ProjectWorkspace { } } - let libstd = sysroot.std().and_then(|it| sysroot_crates.get(&it).map(|&it| it)); + let libstd = sysroot.std().and_then(|it| sysroot_crates.get(&it).copied()); let mut pkg_to_lib_crate = FxHashMap::default(); let mut pkg_crates = FxHashMap::default(); diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs index a419b81e8..4f6e880dd 100644 --- a/crates/ra_project_model/src/sysroot.rs +++ b/crates/ra_project_model/src/sysroot.rs @@ -94,7 +94,7 @@ impl SysrootCrate { self.root(sysroot).parent().unwrap() } pub fn deps<'a>(self, sysroot: &'a Sysroot) -> impl Iterator + 'a { - sysroot.crates[self].deps.iter().map(|&it| it) + sysroot.crates[self].deps.iter().copied() } } -- cgit v1.2.3