summaryrefslogtreecommitdiff
path: root/rustlings/exercises/10_modules/modules1.rs
blob: 0d7c5a2da9230cc6857b22ac8b89ad6730616444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod sausage_factory {
    // Don't let anybody outside of this module see this!
    fn get_secret_recipe() -> String {
        String::from("Ginger")
    }

    pub fn make_sausage() {
        get_secret_recipe();
        println!("sausage!");
    }
}

fn main() {
    sausage_factory::make_sausage();
}