rustlings/exercises/10_modules/modules1.rs
2024-04-17 23:34:27 +02:00

15 lines
300 B
Rust

mod sausage_factory {
// Don't let anybody outside of this module see this!
fn get_secret_recipe() -> String {
String::from("Ginger")
}
fn make_sausage() {
get_secret_recipe();
println!("sausage!");
}
}
fn main() {
sausage_factory::make_sausage();
}