Fixes leave on the server and reworked login flow.
This commit is contained in:
12
gamenight-cli/src/domain/participants.rs
Normal file
12
gamenight-cli/src/domain/participants.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use crate::domain::user::User;
|
||||
|
||||
pub struct Participants<'a>(pub &'a Vec<User>);
|
||||
|
||||
impl<'a> Display for Participants<'a> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let string_list: Vec<String> = self.0.iter().map(|x| {format!("{}", x)}).collect();
|
||||
write!(f, "{}", string_list.join(", "))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user