refactor printing

This commit is contained in:
2026-01-17 16:12:08 +02:00
parent 0453ce4d2b
commit f5109c6338

View File

@@ -1,13 +1,10 @@
/// This is the best implementation of this program to ever exist.
fn main() {
print_hello();
print_goodbye();
print("Hello, world!");
print("Goodbye, world!");
}
fn print_hello() {
println!("Hello, world!");
}
fn print_goodbye() {
println!("Goodbye, world!");
// a function that prints the msg
fn print(m: &str) {
println!("{m}")
}