refactor printing
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -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}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user