Going through rustlings for the first time
at main 370 B view raw
1// TODO: Fix the compiler error about calling a private function. 2mod sausage_factory { 3 // Don't let anybody outside of this module see this! 4 fn get_secret_recipe() -> String { 5 String::from("Ginger") 6 } 7 8 pub fn make_sausage() { 9 get_secret_recipe(); 10 println!("sausage!"); 11 } 12} 13 14fn main() { 15 sausage_factory::make_sausage(); 16}