From 28365368429868e66cf663b7d5676d890a9d1530 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Mon, 11 Dec 2023 03:31:18 +0200 Subject: [PATCH] perf: dereference &&str to use specialized ToString implementation --- crates/lib/src/protocols/gamespy/protocols/three/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib/src/protocols/gamespy/protocols/three/protocol.rs b/crates/lib/src/protocols/gamespy/protocols/three/protocol.rs index 1dfb623..6e70ab9 100644 --- a/crates/lib/src/protocols/gamespy/protocols/three/protocol.rs +++ b/crates/lib/src/protocols/gamespy/protocols/three/protocol.rs @@ -282,7 +282,7 @@ fn parse_players_and_teams(packets: Vec>) -> GDResult<(Vec, Vec< } let entry_data = data.get_mut(offset).ok_or(PacketBad)?; - entry_data.insert(field_name.to_string(), item); + entry_data.insert((*field_name).to_string(), item); offset += 1; }