run cargo fmt
authorGeoffrey Allott <geoffrey@allott.email>
Sat, 17 Jun 2023 22:20:07 +0000 (23:20 +0100)
committerGeoffrey Allott <geoffrey@allott.email>
Sat, 17 Jun 2023 22:20:07 +0000 (23:20 +0100)
src/game/action.rs
src/game/whist.rs

index 68da1c4a715c29c5f0c9417914ffad1385119197..8725b9e4cb437fa0c38dd69c8ca1a6e3af5e62d6 100644 (file)
@@ -26,7 +26,7 @@ impl ValidatedUserAction {
                 Action::PutInBox { .. } if username != self.0.username => Action::PutInBox { card: None },
                 Action::DealBox { .. } => Action::DealBox { card: None },
                 action => action.clone(),
-            }
+            },
         }
     }
 }
index 131070b7058458b5ef9451d0ca0b307c9eda9678..de5b51e1011ec77a647250d7da898c1060156f88 100644 (file)
@@ -357,10 +357,8 @@ impl Game for KnockOutWhist {
             State::ChoosingTrumps => DealerAction::WaitForPlayer,
             State::Playing => {
                 if !self.winners.is_empty() {
-                    let knocked_out_player = self.seats.player_set()
-                        .into_iter()
-                        .filter(|username| matches!(self.tricks_won.get(username), Some(0) | None))
-                        .min();
+                    let knocked_out_player =
+                        self.seats.player_set().into_iter().filter(|username| matches!(self.tricks_won.get(username), Some(0) | None)).min();
                     if let Some(username) = knocked_out_player {
                         return DealerAction::TakeAction(ValidatedUserAction(UserAction { timestamp, username, action: Action::KnockedOut }));
                     }
@@ -380,10 +378,7 @@ impl Game for KnockOutWhist {
                 }
             }
             State::CutForCall => {
-                let knocked_out_player = self.seats.player_set()
-                    .into_iter()
-                    .filter(|username| matches!(self.tricks_won.get(username), Some(0) | None))
-                    .min();
+                let knocked_out_player = self.seats.player_set().into_iter().filter(|username| matches!(self.tricks_won.get(username), Some(0) | None)).min();
                 if let Some(username) = knocked_out_player {
                     return DealerAction::TakeAction(ValidatedUserAction(UserAction { timestamp, username, action: Action::KnockedOut }));
                 }