mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 12:19:18 +00:00
update exercise module1 by adding secret function
This commit is contained in:
parent
64c35cf781
commit
f08414495f
@ -4,7 +4,13 @@
|
||||
// I AM NOT DONE
|
||||
|
||||
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!");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user