let a\_int = 90; // int
// int to float
let mut type\_cast = (a_int as f64);
let orginal: char = 'I';
// char to int => 73
let type\_casted: i64 = orginal as i64;
To perform type-casting in Rust one must use the as
keyword.
Comments
let a\_int = 90; // int
// int to float
let mut type\_cast = (a_int as f64);
let orginal: char = 'I';
// char to int => 73
let type\_casted: i64 = orginal as i64;
To perform type-casting in Rust one must use the as
keyword.