update exercise module1 by adding secret function

This commit is contained in:
Shmulik Cohen 2021-08-13 14:01:24 +03:00
parent 315a6cab25
commit f88f09e986

View File

@ -4,7 +4,13 @@
// I AM NOT DONE // I AM NOT DONE
mod sausage_factory { mod sausage_factory {
fn make_sausage() { // Don't let anybody outside of this module to see that!
fn get_secret_recipe() -> String {
String::from("Ginger")
}
pub fn make_sausage() {
get_secret_recipe();
println!("sausage!"); println!("sausage!");
} }
} }