# HG changeset patch # User unc0rr # Date 1544390371 -3600 # Node ID 694c96fb3a063e790793d3ee0bd614b9cd7275cc # Parent f39d34d78028b79959e54f7c591a93a572db0cf7 Fix fail to parse protocol number from engine diff -r f39d34d78028 -r 694c96fb3a06 rust/hedgewars-checker/src/main.rs --- a/rust/hedgewars-checker/src/main.rs Sun Dec 09 21:13:38 2018 +0100 +++ b/rust/hedgewars-checker/src/main.rs Sun Dec 09 22:19:31 2018 +0100 @@ -175,7 +175,7 @@ fn get_protocol_number(executable: &str) -> std::io::Result { let output = Command::new(executable).arg("--protocol").output()?; - Ok(u32::from_str(&String::from_utf8(output.stdout).unwrap().as_str()).unwrap_or(55)) + Ok(u32::from_str(&String::from_utf8(output.stdout).unwrap().trim()).unwrap_or(55)) } fn main() {