mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-22 17:44:22 +00:00
Replace map
and flatten
with filter_map
This commit is contained in:
parent
96613c6626
commit
933907cd5f
1 changed files with 1 additions and 2 deletions
|
@ -520,8 +520,7 @@ impl Deck {
|
|||
///
|
||||
pub fn cards_are_allowed_in(&self, cards: &CardIndex, format: CardFormat) -> bool {
|
||||
self.contents.keys()
|
||||
.map(|cc| cc.to_card(cards))
|
||||
.flatten()
|
||||
.filter_map(|cc| cc.to_card(cards))
|
||||
.all(|c| c.formats.contains(&format))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue