Created
October 21, 2018 08:54
-
-
Save isaacd9/0bacb0644f8e2e2e6740908a26d0fe08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn inc(num: &mut i32) { | |
*num += 1; | |
} | |
fn main() { | |
let mut x: i32 = 100; | |
inc(&mut x); | |
println!("Got {}", x) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment