Use flatten instead of flat_map
This commit is contained in:
@@ -127,8 +127,8 @@ impl Batch {
|
||||
) {
|
||||
let this_agent = composition
|
||||
.iter()
|
||||
.flat_map(|teams| teams.iter())
|
||||
.flat_map(|team| team.iter())
|
||||
.flatten()
|
||||
.flatten()
|
||||
.cloned()
|
||||
.collect::<HashSet<_>>();
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ impl History {
|
||||
) -> Self {
|
||||
let this_agent = composition
|
||||
.iter()
|
||||
.flat_map(|teams| teams.iter())
|
||||
.flat_map(|team| team.iter())
|
||||
.flatten()
|
||||
.flatten()
|
||||
.cloned()
|
||||
.collect::<HashSet<_>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user