1
Fork 0
mirror of https://github.com/Steffo99/patched-porobot.git synced 2024-12-23 01:54:22 +00:00

Use ? operator in Deck::min_deckcode_version

This commit is contained in:
Steffo 2022-08-22 18:18:52 +02:00
parent 60060b9a31
commit b432103c56
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -108,9 +108,7 @@ impl DeckCodeVersioned for Deck {
// TODO: I'm almost sure this can be optimized, but it's 5 AM // TODO: I'm almost sure this can be optimized, but it's 5 AM
for version in versions.clone() { for version in versions.clone() {
if version.is_none() { version?;
return None;
}
} }
let versions = versions.map(|v| v.unwrap()); let versions = versions.map(|v| v.unwrap());