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:
commit
73aa2bd707
5 changed files with 16 additions and 17 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue