From 58f7ff8aab74ef81b1e94dd7d8f4a18860387278 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Tue, 27 Jun 2023 01:08:42 +0300 Subject: [PATCH] [Protocol] Fix common quake 2 player score conversion --- src/protocols/quake/two.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/quake/two.rs b/src/protocols/quake/two.rs index aadcf12..256a5ce 100644 --- a/src/protocols/quake/two.rs +++ b/src/protocols/quake/two.rs @@ -31,7 +31,7 @@ impl CommonPlayer for Player { fn name(&self) -> &str { &self.name } - fn score(&self) -> Option { Some(self.score.into()) } + fn score(&self) -> Option { Some(self.score.try_into().unwrap_or(0)) } } pub(crate) struct QuakeTwo;