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.
This commit is contained in:
Tyler Mandry 2019-10-01 23:06:19 -07:00 committed by GitHub
commit 73aa2bd707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 17 deletions

View file

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