refactor printing
This commit is contained in:
+5
-8
@@ -1,13 +1,10 @@
|
|||||||
/// This is the best implementation of this program to ever exist.
|
/// This is the best implementation of this program to ever exist.
|
||||||
fn main() {
|
fn main() {
|
||||||
print_hello();
|
print("Hello, world!");
|
||||||
print_goodbye();
|
print("Goodbye, world!");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_hello() {
|
// a function that prints the msg
|
||||||
println!("Hello, world!");
|
fn print(m: &str) {
|
||||||
}
|
println!("{m}")
|
||||||
|
|
||||||
fn print_goodbye() {
|
|
||||||
println!("Goodbye, world!");
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user