12 lines
365 B
Rust
12 lines
365 B
Rust
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(", "))
|
|
}
|
|
} |