This repository has been archived on 2025-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-10-29 11:28:19 +01:00

17 lines
370 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")
}
pub fn make_sausage() {
get_secret_recipe();
println!("sausage!");
}
}
fn main() {
sausage_factory::make_sausage();
}