2018-02-22 09:09:53 +03:00
|
|
|
// modules1.rs
|
2019-11-11 18:51:38 +03:00
|
|
|
// Make me compile! Execute `rustlings hint modules1` for hints :)
|
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();
|
|
|
|
}
|