|
|
|
@ -33,7 +33,6 @@ impl RoomMap { |
|
|
|
|
|
|
|
/// Inserts the given room in the map under the given name.
|
|
|
|
/// Same semantics as `std::collections::HashMap::insert()`.
|
|
|
|
#[cfg(test)]
|
|
|
|
pub fn insert(&mut self, name: String, room: Room) -> Option<Room> {
|
|
|
|
self.map.insert(name, room)
|
|
|
|
}
|
|
|
|
@ -76,7 +75,7 @@ impl RoomMap { |
|
|
|
room
|
|
|
|
}
|
|
|
|
};
|
|
|
|
if let Some(_) = self.map.insert(name, room) {
|
|
|
|
if let Some(_) = self.insert(name, room) {
|
|
|
|
error!("Room present twice in room list response");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|