mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-07 23:13:55 +02:00
Update Exercises Directory Names to Reflect Order
This commit is contained in:
22
exercises/10_modules/modules1.rs
Normal file
22
exercises/10_modules/modules1.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
// modules1.rs
|
||||
//
|
||||
// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
mod sausage_factory {
|
||||
// Don't let anybody outside of this module see this!
|
||||
fn get_secret_recipe() -> String {
|
||||
String::from("Ginger")
|
||||
}
|
||||
|
||||
fn make_sausage() {
|
||||
get_secret_recipe();
|
||||
println!("sausage!");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
sausage_factory::make_sausage();
|
||||
}
|
||||
Reference in New Issue
Block a user