diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 22:56:36 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 22:56:36 +0100 |
commit | b1bf434dfcf81ac681a9e152628f9eecde68470a (patch) | |
tree | 51ea069481d3a5eefa9ec1f558a12c85690dabce /crates/ra_project_model/src | |
parent | c6a6e43372de9530ec7df0f38352466ed107e1a2 (diff) | |
parent | e7fb6c83cc33facf0d74e253bd193afc46b1dc5c (diff) |
Merge #1482
1482: Some clippy fixes for 1.36 r=kjeremy a=kjeremy
Some clippy fixes now that 1.36 is released. ~~Plus the requisite format run (I can rebase after #1481 is merged to make this cleaner) .~~
The change from `map(|it| *it)` to `copied()` changes the minimum rust stable to 1.36.
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_project_model/src')
-rw-r--r-- | crates/ra_project_model/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_project_model/src/sysroot.rs | 2 |
2 files changed, 2 insertions, 2 deletions
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 { | |||
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
194 | let libstd = sysroot.std().and_then(|it| sysroot_crates.get(&it).map(|&it| it)); | 194 | let libstd = sysroot.std().and_then(|it| sysroot_crates.get(&it).copied()); |
195 | 195 | ||
196 | let mut pkg_to_lib_crate = FxHashMap::default(); | 196 | let mut pkg_to_lib_crate = FxHashMap::default(); |
197 | let mut pkg_crates = FxHashMap::default(); | 197 | 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 { | |||
94 | self.root(sysroot).parent().unwrap() | 94 | self.root(sysroot).parent().unwrap() |
95 | } | 95 | } |
96 | pub fn deps<'a>(self, sysroot: &'a Sysroot) -> impl Iterator<Item = SysrootCrate> + 'a { | 96 | pub fn deps<'a>(self, sysroot: &'a Sysroot) -> impl Iterator<Item = SysrootCrate> + 'a { |
97 | sysroot.crates[self].deps.iter().map(|&it| it) | 97 | sysroot.crates[self].deps.iter().copied() |
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||