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