Merge pull request #40 from Zyfarok/master

Fix shadowing example
pull/45/head
Dhghomon 4 years ago committed by GitHub
commit c01835408a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -703,7 +703,7 @@ fn main() {
let y = 10;
let x = 9; // x starts at 9
let x_twice = times_two(x); // second name for x
let x_twice_and_y = x + y; // third name for x
let x_twice_and_y = x_twice + y; // third name for x
x_twice_and_y // too bad we didn't have shadowing - we could have just used x
};
println!("The number is now: {}", final_number)

Loading…
Cancel
Save