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