misc: formatting and compile fix

This commit is contained in:
2026-03-22 14:51:00 -04:00
Unverified
parent 677c70a763
commit c5738741f1
7 changed files with 1890 additions and 1903 deletions

View File

@@ -9,15 +9,15 @@ pub use round_robin::RoundRobin;
#[async_trait]
pub trait Tournament {
fn new(ready_players: &[SocketAddr]) -> Self
where
Self: Sized;
async fn next(&mut self, server: &Server);
async fn start(&mut self, server: &Server);
async fn cancel(&mut self, server: &Server);
fn inform_winner(&mut self, winner: SocketAddr, is_tie: bool);
fn inform_reconnect(&mut self, old_addr: SocketAddr, new_addr: SocketAddr);
fn contains_player(&self, addr: SocketAddr) -> bool;
fn is_completed(&self) -> bool;
fn get_type(&self) -> String;
fn new(ready_players: &[SocketAddr]) -> Self
where
Self: Sized;
async fn next(&mut self, server: &Server);
async fn start(&mut self, server: &Server);
async fn cancel(&mut self, server: &Server);
fn inform_winner(&mut self, winner: SocketAddr, is_tie: bool);
fn inform_reconnect(&mut self, old_addr: SocketAddr, new_addr: SocketAddr);
fn contains_player(&self, addr: SocketAddr) -> bool;
fn is_completed(&self) -> bool;
fn get_type(&self) -> String;
}