From 2f9e5dfaac05538fdf4513569b4df6872ee85b89 Mon Sep 17 00:00:00 2001 From: natrixaeria Date: Wed, 15 May 2019 23:46:11 +0200 Subject: Add web client functionality additionally added -r feature to build.sh, which reverses build output. --- game_server/src/lobby.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'game_server/src/lobby.rs') diff --git a/game_server/src/lobby.rs b/game_server/src/lobby.rs index 8808b7f..fe3bdee 100644 --- a/game_server/src/lobby.rs +++ b/game_server/src/lobby.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use super::group::{Group, GroupId}; pub struct Lobby { - groups: HashMap, + groups: HashMap>, } impl Lobby { @@ -13,8 +13,8 @@ impl Lobby { } } - pub fn add_group(&mut self, group: Group) { - self.groups.insert(group.get_id(), group); + pub fn add_group(&mut self, group: Box) { + self.groups.insert(group.id(), group); } pub fn iter<'a>(&'a self) -> GroupIterator<'a> { @@ -23,11 +23,11 @@ impl Lobby { } pub struct GroupIterator<'a> { - groups: std::collections::hash_map::Values<'a, GroupId, Group> + groups: std::collections::hash_map::Values<'a, GroupId, Box> } impl<'a> Iterator for GroupIterator<'a> { - type Item = &'a Group; + type Item = &'a Box; fn next(&mut self) -> Option { self.groups.next() -- cgit v1.2.3-54-g00ecf