2018-02-22 06:09:53 +00:00
|
|
|
// modules1.rs
|
2023-05-29 18:39:08 +01:00
|
|
|
//
|
|
|
|
// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a
|
|
|
|
// hint.
|
2015-09-18 03:21:56 +01:00
|
|
|
|
2019-11-11 12:38:24 +00:00
|
|
|
// I AM NOT DONE
|
|
|
|
|
2015-09-18 03:21:56 +01:00
|
|
|
mod sausage_factory {
|
2021-09-03 09:41:12 +01:00
|
|
|
// Don't let anybody outside of this module see this!
|
|
|
|
fn get_secret_recipe() -> String {
|
|
|
|
String::from("Ginger")
|
|
|
|
}
|
|
|
|
|
2015-09-18 03:21:56 +01:00
|
|
|
fn make_sausage() {
|
2021-09-03 09:41:12 +01:00
|
|
|
get_secret_recipe();
|
2015-09-18 03:21:56 +01:00
|
|
|
println!("sausage!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
sausage_factory::make_sausage();
|
|
|
|
}
|