remove redundant closures (clippy::redundant_closure)

This commit is contained in:
Matthias Krüger 2020-12-30 04:19:09 +01:00
parent 18cb4ad3b9
commit e2272cdffc
11 changed files with 42 additions and 45 deletions

View file

@ -55,7 +55,7 @@ impl NodeLabels<&'static str> {
fn to_opt_strs(self) -> Vec<Option<&'static str>> {
match self {
UnlabelledNodes(len) => vec![None; len],
AllNodesLabelled(lbls) => lbls.into_iter().map(|l| Some(l)).collect(),
AllNodesLabelled(lbls) => lbls.into_iter().map(Some).collect(),
SomeNodesLabelled(lbls) => lbls.into_iter().collect(),
}
}