rust convert string to float code example Example: how to convert int to float in rust let y = x as f32;