diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-10-01 23:06:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-01 23:06:19 -0700 |
| commit | 73aa2bd70707fe90f11b89a122c202bbb4eac93c (patch) | |
| tree | 6ee019b419d2a103156a9ca9ca4d8d9137d0bdbb /src/librustc_data_structures | |
| parent | 76fb91be84e93f6d34a428d997e92fcbf4a19f23 (diff) | |
| parent | f10d2e2d23e6a47bb7d3df17d4fbe067f8c99ea9 (diff) | |
| download | rust-73aa2bd70707fe90f11b89a122c202bbb4eac93c.tar.gz rust-73aa2bd70707fe90f11b89a122c202bbb4eac93c.zip | |
Rollup merge of #64942 - JohnTitor:fix-clippy, r=eddyb
Fix clippy warnings * Use `match` instead of `if` chain * Remove redundant `into_iter()` * Use `copied()` instead of `map()` etc.
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/graph/implementation/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_data_structures/graph/implementation/mod.rs b/src/librustc_data_structures/graph/implementation/mod.rs index 052a09c0774..c438a8558a7 100644 --- a/src/librustc_data_structures/graph/implementation/mod.rs +++ b/src/librustc_data_structures/graph/implementation/mod.rs @@ -303,11 +303,11 @@ pub struct AdjacentEdges<'g, N, E> { impl<'g, N: Debug, E: Debug> AdjacentEdges<'g, N, E> { fn targets(self) -> impl Iterator<Item = NodeIndex> + 'g { - self.into_iter().map(|(_, edge)| edge.target) + self.map(|(_, edge)| edge.target) } fn sources(self) -> impl Iterator<Item = NodeIndex> + 'g { - self.into_iter().map(|(_, edge)| edge.source) + self.map(|(_, edge)| edge.source) } } |
