Browse Source

Use RoomMap::insert() in regular builds.

main
Titouan Rigoudy 2 years ago
parent
commit
254bd2bce7
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      client/src/room/map.rs

+ 1
- 2
client/src/room/map.rs View File

@ -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");
}
}


Loading…
Cancel
Save