mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-24 14:37:32 -05:00
15 lines
329 B
Rust
15 lines
329 B
Rust
mod sausage_factory {
|
|
fn get_secret_recipe() -> String {
|
|
String::from("Ginger")
|
|
}
|
|
|
|
// Added `pub` before `fn` to make the function accessible outside the module.
|
|
pub fn make_sausage() {
|
|
get_secret_recipe();
|
|
println!("sausage!");
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
sausage_factory::make_sausage();
|
|
}
|