1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-01-21 00:00:03 +03:00
rustlings/exercises/10_modules/modules1.rs

16 lines
300 B
Rust
Raw Normal View History

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();
}