mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-10 12:49:18 +00:00
update: done the modules
This commit is contained in:
parent
aad6b7ad2a
commit
1f18adf6fc
@ -3,15 +3,13 @@
|
|||||||
// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a
|
// Execute `rustlings hint modules1` or use the `hint` watch subcommand for a
|
||||||
// hint.
|
// hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
pub mod sausage_factory {
|
||||||
|
|
||||||
mod sausage_factory {
|
|
||||||
// Don't let anybody outside of this module see this!
|
// Don't let anybody outside of this module see this!
|
||||||
fn get_secret_recipe() -> String {
|
fn get_secret_recipe() -> String {
|
||||||
String::from("Ginger")
|
String::from("Ginger")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_sausage() {
|
pub fn make_sausage() {
|
||||||
get_secret_recipe();
|
get_secret_recipe();
|
||||||
println!("sausage!");
|
println!("sausage!");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,12 +7,10 @@
|
|||||||
// Execute `rustlings hint modules2` or use the `hint` watch subcommand for a
|
// Execute `rustlings hint modules2` or use the `hint` watch subcommand for a
|
||||||
// hint.
|
// hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
|
||||||
|
|
||||||
mod delicious_snacks {
|
mod delicious_snacks {
|
||||||
// TODO: Fix these use statements
|
// TODO: Fix these use statements
|
||||||
use self::fruits::PEAR as ???
|
pub use self::fruits::PEAR as fruit;
|
||||||
use self::veggies::CUCUMBER as ???
|
pub use self::veggies::CUCUMBER as veggie;
|
||||||
|
|
||||||
mod fruits {
|
mod fruits {
|
||||||
pub const PEAR: &'static str = "Pear";
|
pub const PEAR: &'static str = "Pear";
|
||||||
|
|||||||
@ -8,10 +8,8 @@
|
|||||||
// Execute `rustlings hint modules3` or use the `hint` watch subcommand for a
|
// Execute `rustlings hint modules3` or use the `hint` watch subcommand for a
|
||||||
// hint.
|
// hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
|
||||||
|
|
||||||
// TODO: Complete this use statement
|
// TODO: Complete this use statement
|
||||||
use ???
|
use std::time::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
match SystemTime::now().duration_since(UNIX_EPOCH) {
|
match SystemTime::now().duration_since(UNIX_EPOCH) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user