mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 20:29:18 +00:00
update exercise module1 by adding secret function
This commit is contained in:
parent
315a6cab25
commit
f88f09e986
@ -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!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user