refactor printing

This commit is contained in:
2025-09-24 19:35:43 +02:00
parent 4bfe070017
commit b79b01c53b

View File

@@ -3,14 +3,11 @@
/// Crastimus Maximilian
fn main() {
print_hello();
print_goodbye();
print("Hello, world!");
print("Goodbye!");
}
fn print_hello() {
println!("Hello world!");
}
fn print_goodbye() {
println!("Goodbye!");
// a function that prints a message
fn print(m: &str) {
println!("{m}");
}