rust convert From<i32> to float code example Example: how to convert int to float in rust let y = x as f32;