From: Greg Burri Date: Mon, 22 Mar 2021 21:45:18 +0000 (+0100) Subject: Set the parsing type X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=83993038d45c0d11c11417f9b47e19eb61e53928;p=valheim_web.git Set the parsing type --- 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;