mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
16 lines
366 B
Rust
16 lines
366 B
Rust
// TODO: Fix the compiler error about calling a private function.
|
|
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();
|
|
}
|