Add a parameter to another_function
This commit is contained in:
parent
ad1c063af0
commit
4bc2d864e1
|
@ -1,9 +1,7 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
another_function(5);
|
||||||
|
|
||||||
another_function();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn another_function() {
|
fn another_function(x: i32) {
|
||||||
println!("Another function.");
|
println!("The value of x is: {x}");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue