Skip to content

Instantly share code, notes, and snippets.

@jorendorff
Last active November 25, 2015 11:44
Show Gist options
  • Select an option

  • Save jorendorff/62fed5a2bfba33f2f810 to your computer and use it in GitHub Desktop.

Select an option

Save jorendorff/62fed5a2bfba33f2f810 to your computer and use it in GitHub Desktop.
// mut variables are mutable
fn main() {
let mut x = 1;
x += 1;
let mut nums = vec![1, 2, 3];
nums.push(4);
println!("x is {:?} and nums is {:?}", x, nums);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment