Skip to content

Instantly share code, notes, and snippets.

@zenyuk
Created June 4, 2021 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zenyuk/8744276ca970dca4562e15e4149ea629 to your computer and use it in GitHub Desktop.
Save zenyuk/8744276ca970dca4562e15e4149ea629 to your computer and use it in GitHub Desktop.
rust default int as i32
let x = 5;
// same as:
let y = 5i32;
// or
let z: i32;
z = 5;
// or
let a: i32 = 5;
println!("x:{}, y:{}, z:{}, a:{}", x, y, z, a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment