2018-02-22 01:09:53 -05:00
|
|
|
// modules1.rs
|
2019-11-11 10:51:38 -05:00
|
|
|
// Make me compile! Execute `rustlings hint modules1` for hints :)
|
2015-09-17 22:21:56 -04:00
|
|
|
|
2019-11-11 07:38:24 -05:00
|
|
|
// I AM NOT DONE
|
|
|
|
|
2015-09-17 22:21:56 -04:00
|
|
|
mod sausage_factory {
|
2021-09-03 04:41:12 -04:00
|
|
|
// Don't let anybody outside of this module see this!
|
|
|
|
fn get_secret_recipe() -> String {
|
|
|
|
String::from("Ginger")
|
|
|
|
}
|
|
|
|
|
2015-09-17 22:21:56 -04:00
|
|
|
fn make_sausage() {
|
2021-09-03 04:41:12 -04:00
|
|
|
get_secret_recipe();
|
2015-09-17 22:21:56 -04:00
|
|
|
println!("sausage!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
sausage_factory::make_sausage();
|
|
|
|
}
|