let f = s.parse::<f32>().unwrap(); // Can also do: let f: f32 = s.parse().unwrap();
let s = format!("{:.2}", x);