mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-04 01:03:31 +02:00
progress(modules + hashmaps): finished modules and almost done hashmaps
This commit is contained in:
@@ -5,7 +5,7 @@ mod sausage_factory {
|
||||
String::from("Ginger")
|
||||
}
|
||||
|
||||
fn make_sausage() {
|
||||
pub fn make_sausage() {
|
||||
get_secret_recipe();
|
||||
println!("sausage!");
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user