2018-02-22 01:09:53 -05:00
|
|
|
// modules1.rs
|
2023-05-29 13:39:08 -04:00
|
|
|
//
|
|
|
|
// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a
|
|
|
|
// hint.
|
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();
|
|
|
|
}
|