diff options
| author | Jomar Milan <jomarm@jomarm.com> | 2026-06-22 20:24:41 -0700 |
|---|---|---|
| committer | Jomar Milan <jomarm@jomarm.com> | 2026-06-22 20:24:41 -0700 |
| commit | 0fb21c71c86e4bc0bce95522ea4a24a72b2f47a4 (patch) | |
| tree | aeeb617bbebed837cbd8b10e3c8e5b04eaa0485b /src/session.rs | |
| parent | b5b9f714f9bb41d2bc1fd2889d5c587b4eb9760d (diff) | |
These doc comments are very minor, but I felt like adding something and I didn't know what to put. The doc comments are for the module and for pub elements.
Diffstat (limited to 'src/session.rs')
| -rw-r--r-- | src/session.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/session.rs b/src/session.rs index 246551e..4557a5a 100644 --- a/src/session.rs +++ b/src/session.rs @@ -1,4 +1,4 @@ -use crate::app::socket::PlayUpdate; +use crate::app::socket::SessionUpdate; use serde::{Deserialize, Serialize}; use std::array; use std::ops::Index; @@ -8,7 +8,7 @@ use tokio::sync::broadcast; pub struct Session { pub steam_name: String, pub seats: [Vec<HandObject>; PlayerColor::COUNT], - pub update_tx: broadcast::Sender<PlayUpdate>, + pub update_tx: broadcast::Sender<SessionUpdate>, } #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] @@ -82,7 +82,7 @@ impl Session { self.seats = hands.to_owned(); // Updating the hand is a success regardless of whether there are players connected to // receive a hand update - let _ = self.update_tx.send(PlayUpdate::HandUpdate(hands)); + let _ = self.update_tx.send(SessionUpdate::HandUpdate(hands)); } } @@ -206,7 +206,7 @@ mod tests { session.update_hands(hands); - let PlayUpdate::HandUpdate(hand) = update_rx.recv().await.unwrap(); + let SessionUpdate::HandUpdate(hand) = update_rx.recv().await.unwrap(); assert_eq!( hand[PlayerColor::Red as usize].first().unwrap().to_owned(), |
