progress(modules + hashmaps): finished modules and almost done hashmaps

This commit is contained in:
2026-07-26 02:09:37 +02:00
parent f0f6a72101
commit 2844976587
6 changed files with 12 additions and 53 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ mod sausage_factory {
String::from("Ginger")
}
fn make_sausage() {
pub fn make_sausage() {
get_secret_recipe();
println!("sausage!");
}
+3
View File
@@ -5,6 +5,9 @@ mod delicious_snacks {
// TODO: Add the following two `use` statements after fixing them.
// 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: &str = "Pear";
+2
View File
@@ -4,6 +4,8 @@
// TODO: Bring `SystemTime` and `UNIX_EPOCH` from the `std::time` module into
// your scope. Bonus style points if you can do it with one line!
// use ???;
use std::time::SystemTime;
use std::time::UNIX_EPOCH;
fn main() {
match SystemTime::now().duration_since(UNIX_EPOCH) {