Skip to content

Commit

Permalink
finish all modules problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
aacxx committed Jan 29, 2025
1 parent 5e84888 commit 53f9b71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions exercises/modules/modules1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a
// hint.

// 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!");
}
Expand Down
7 changes: 2 additions & 5 deletions exercises/modules/modules2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
// Execute `rustlings hint modules2` or use the `hint` watch subcommand for a
// hint.

// 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";
pub const APPLE: &'static str = "Apple";
Expand Down
3 changes: 1 addition & 2 deletions exercises/modules/modules3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
// Execute `rustlings hint modules3` or use the `hint` watch subcommand for a
// hint.

// I AM NOT DONE

// TODO: Complete this use statement
use ???
use std::time::*;

fn main() {
match SystemTime::now().duration_since(UNIX_EPOCH) {
Expand Down

0 comments on commit 53f9b71

Please sign in to comment.