This repository has been archived on 2023-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
2018-02-22 00:09:53 -06:00
|
|
|
// modules1.rs
|
2022-07-14 05:35:49 -05:00
|
|
|
// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a hint.
|
2015-09-17 21:21:56 -05:00
|
|
|
|
|
|
|
mod sausage_factory {
|
2021-09-03 03:41:12 -05:00
|
|
|
// Don't let anybody outside of this module see this!
|
|
|
|
fn get_secret_recipe() -> String {
|
|
|
|
String::from("Ginger")
|
|
|
|
}
|
|
|
|
|
2023-03-24 16:18:51 -05:00
|
|
|
pub fn make_sausage() {
|
2021-09-03 03:41:12 -05:00
|
|
|
get_secret_recipe();
|
2015-09-17 21:21:56 -05:00
|
|
|
println!("sausage!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
sausage_factory::make_sausage();
|
|
|
|
}
|