forked from Roflin/gamenight
Implemented deleting games as admin.
This commit is contained in:
@@ -2,12 +2,12 @@ use std::{collections::HashMap, fmt::Display};
|
||||
|
||||
use crate::domain::game::Game;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct OwnedGames(pub HashMap<String, Vec<Game>>);
|
||||
|
||||
pub struct OwnedGames<'a>(pub &'a HashMap<String, Vec<Game>>);
|
||||
|
||||
impl<'a> Display for OwnedGames<'a> {
|
||||
impl Display for OwnedGames {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
for (k,v) in self.0 {
|
||||
for (k,v) in &self.0 {
|
||||
write!(f, "{k}:\n")?;
|
||||
for g in v {
|
||||
write!(f, "\t{}\n", g.name)?;
|
||||
|
||||
Reference in New Issue
Block a user