diff --git a/exercises/modules/modules1.rs b/exercises/modules/modules1.rs index 1a2bd0dd..3535a36a 100644 --- a/exercises/modules/modules1.rs +++ b/exercises/modules/modules1.rs @@ -1,15 +1,13 @@ // 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() { + pub fn make_sausage() { get_secret_recipe(); println!("sausage!"); } diff --git a/exercises/modules/modules2.rs b/exercises/modules/modules2.rs index 87f0c458..50a3f080 100644 --- a/exercises/modules/modules2.rs +++ b/exercises/modules/modules2.rs @@ -1,15 +1,9 @@ // modules2.rs -// You can bring module paths into scopes and provide new names for them with the -// 'use' and 'as' keywords. Fix these 'use' statements to make the code compile. // Make me compile! Execute `rustlings hint modules2` for hints :) -// I AM NOT DONE - mod delicious_snacks { - - // TODO: Fix these use statements - use self::fruits::PEAR as ??? - use self::veggies::CUCUMBER as ??? + pub use self::fruits::PEAR as fruit; + pub use self::veggies::CUCUMBER as veggie; mod fruits { pub const PEAR: &'static str = "Pear"; diff --git a/exercises/modules/modules3.rs b/exercises/modules/modules3.rs index 8eed77df..9a38ceed 100644 --- a/exercises/modules/modules3.rs +++ b/exercises/modules/modules3.rs @@ -5,10 +5,8 @@ // from the std::time module. Bonus style points if you can do it with one line! // Make me compile! Execute `rustlings hint modules3` for hints :) -// I AM NOT DONE - // TODO: Complete this use statement -use ??? +use std::time::{SystemTime, UNIX_EPOCH}; fn main() { match SystemTime::now().duration_since(UNIX_EPOCH) {