fork download
  1. fn main() {
  2. let x = '1'.to_digit(10).unwrap() as i64;
  3. println!("x = {}", x);
  4. let s: Vec<_> = 42.to_string().chars().collect();
  5. println!("s = {:?}", s);
  6. }
  7.  
Success #stdin #stdout 0s 4244KB
stdin
Standard input is empty
stdout
x = 1
s = ['4', '2']