From 83993038d45c0d11c11417f9b47e19eb61e53928 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Mon, 22 Mar 2021 22:45:18 +0100 Subject: [PATCH] Set the parsing type --- backend/src/valheim_controller.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/valheim_controller.rs b/backend/src/valheim_controller.rs index f8bcbed..6fa6c7f 100644 --- a/backend/src/valheim_controller.rs +++ b/backend/src/valheim_controller.rs @@ -108,9 +108,9 @@ fn get_active_players() -> Vec { else if let Some(pos) = mess.find(STRING_BEFORE_NB_OF_CONNECTIONS) { let nb_of_connections_str = mess.get(pos+STRING_BEFORE_NB_OF_CONNECTIONS.len()+1..).unwrap(); if let Some(pos_end) = nb_of_connections_str.find(' ') { - if let Ok(n) = nb_of_connections_str.get(0..pos_end).unwrap().parse() { + if let Ok(n) = nb_of_connections_str.get(0..pos_end).unwrap().parse::() { if number_of_connections == -1 { - number_of_connections = n as i32; + number_of_connections = n; if players.len() as i32 >= number_of_connections { return players; -- 2.45.2