From ad1c063af0d1a77c0897d4e4764f86d1828c5298 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 14 Oct 2024 18:21:54 +0200 Subject: [PATCH] Create a project for demonstrating functions --- functions/Cargo.lock | 7 +++++++ functions/Cargo.toml | 6 ++++++ functions/src/main.rs | 9 +++++++++ 3 files changed, 22 insertions(+) create mode 100644 functions/Cargo.lock create mode 100644 functions/Cargo.toml create mode 100644 functions/src/main.rs diff --git a/functions/Cargo.lock b/functions/Cargo.lock new file mode 100644 index 0000000..82f83a1 --- /dev/null +++ b/functions/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "functions" +version = "0.1.0" diff --git a/functions/Cargo.toml b/functions/Cargo.toml new file mode 100644 index 0000000..478b346 --- /dev/null +++ b/functions/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "functions" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/functions/src/main.rs b/functions/src/main.rs new file mode 100644 index 0000000..38be856 --- /dev/null +++ b/functions/src/main.rs @@ -0,0 +1,9 @@ +fn main() { + println!("Hello, world!"); + + another_function(); +} + +fn another_function() { + println!("Another function."); +}