From 254bd2bce7f857b8ff5fe2bdee8726369cfacd98 Mon Sep 17 00:00:00 2001 From: Titouan Rigoudy Date: Wed, 30 Nov 2022 14:19:15 +0000 Subject: [PATCH] Use RoomMap::insert() in regular builds. --- client/src/room/map.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/room/map.rs b/client/src/room/map.rs index b32143c..11176bd 100644 --- a/client/src/room/map.rs +++ b/client/src/room/map.rs @@ -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 { 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"); } }