rust/hedgewars-checker/src/main.rs
changeset 14396 694c96fb3a06
parent 14207 bb2f301d4fe0
child 15811 a855f32ab3ca
equal deleted inserted replaced
14395:f39d34d78028 14396:694c96fb3a06
   173 }
   173 }
   174 
   174 
   175 fn get_protocol_number(executable: &str) -> std::io::Result<u32> {
   175 fn get_protocol_number(executable: &str) -> std::io::Result<u32> {
   176     let output = Command::new(executable).arg("--protocol").output()?;
   176     let output = Command::new(executable).arg("--protocol").output()?;
   177 
   177 
   178     Ok(u32::from_str(&String::from_utf8(output.stdout).unwrap().as_str()).unwrap_or(55))
   178     Ok(u32::from_str(&String::from_utf8(output.stdout).unwrap().trim()).unwrap_or(55))
   179 }
   179 }
   180 
   180 
   181 fn main() {
   181 fn main() {
   182     stderrlog::new()
   182     stderrlog::new()
   183         .verbosity(3)
   183         .verbosity(3)