mirror of
https://github.com/rust-lang/rustlings
synced 2024-11-05 00:00:12 +00:00
dfd2fab4f3
Co-authored-by: diannasoriel <mokou@fastmail.com>
21 lines
401 B
Rust
21 lines
401 B
Rust
// modules1.rs
|
|
// Make me compile! Execute `rustlings hint modules1` for hints :)
|
|
|
|
// 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();
|
|
}
|