From 4bc2d864e1421f2a263a15542db56daefe720023 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 14 Oct 2024 18:23:48 +0200 Subject: [PATCH] Add a parameter to `another_function` --- functions/src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/functions/src/main.rs b/functions/src/main.rs index 38be856..108da4f 100644 --- a/functions/src/main.rs +++ b/functions/src/main.rs @@ -1,9 +1,7 @@ fn main() { - println!("Hello, world!"); - - another_function(); + another_function(5); } -fn another_function() { - println!("Another function."); +fn another_function(x: i32) { + println!("The value of x is: {x}"); }