Complete module exercises ()

This commit is contained in:
Tyler Cardinal 2021-05-09 00:26:09 -05:00 committed by GitHub
parent a5b2f208a5
commit 4c3746d379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions
exercises/modules

View file

@ -1,10 +1,8 @@
// modules1.rs
// Make me compile! Execute `rustlings hint modules1` for hints :)
// I AM NOT DONE
mod sausage_factory {
fn make_sausage() {
pub fn make_sausage() {
println!("sausage!");
}
}

View file

@ -1,11 +1,9 @@
// modules2.rs
// Make me compile! Execute `rustlings hint modules2` for hints :)
// I AM NOT DONE
mod delicious_snacks {
use self::fruits::PEAR as fruit;
use self::veggies::CUCUMBER as veggie;
pub use self::fruits::PEAR as fruit;
pub use self::veggies::CUCUMBER as veggie;
mod fruits {
pub const PEAR: &'static str = "Pear";