rust cast usize to i32 code example Example: convert i32 to usize rust let num: i32 = 10; let num_usize: usize = num as usize;