Init from func return with params

cat-town
Dan Buch 6 years ago
parent 17566db003
commit 9136ef39c4
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

@ -1,9 +1,9 @@
fn five() -> i32 {
5
}
fn main() {
let x = five();
let x = plus_one(5);
println!("The value of x is: {}", x);
}
fn plus_one(x: i32) -> i32 {
x + 1
}

Loading…
Cancel
Save