rust parse string to float code example
Example: rust convert a string (with decimals) to a floating point number.
let f = s.parse::<f32>().unwrap();
// Can also do:
let f: f32 = s.parse().unwrap();
let f = s.parse::<f32>().unwrap();
// Can also do:
let f: f32 = s.parse().unwrap();