Skip to content

Commit

Permalink
finish modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Withsan committed Oct 6, 2023
1 parent 9af7680 commit c3fd2d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion exercises/modules/modules1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod sausage_factory {
String::from("Ginger")
}

fn make_sausage() {
pub fn make_sausage() {
get_secret_recipe();
println!("sausage!");
}
Expand Down
4 changes: 2 additions & 2 deletions exercises/modules/modules2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

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";
Expand Down
3 changes: 2 additions & 1 deletion exercises/modules/modules3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
// I AM NOT DONE

// TODO: Complete this use statement
use ???
use std::time::SystemTime;
use std::time::UNIX_EPOCH;

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

0 comments on commit c3fd2d0

Please sign in to comment.