mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 12:19:18 +00:00
Apply suggestions from code review
Co-authored-by: diannasoriel <mokou@fastmail.com>
This commit is contained in:
parent
b87a2323ae
commit
198e3148f5
@ -4,7 +4,7 @@
|
||||
// I AM NOT DONE
|
||||
|
||||
mod sausage_factory {
|
||||
// Don't let anybody outside of this module to see that!
|
||||
// Don't let anybody outside of this module see this!
|
||||
fn get_secret_recipe() -> String {
|
||||
String::from("Ginger")
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// modules2.rs
|
||||
// You can bring module paths into scopes and provide new names for them with the
|
||||
// 'use' and 'as' keyword. Fix these 'use' statments to make the code compile.
|
||||
// 'use' and 'as' keywords. Fix these 'use' statments to make the code compile.
|
||||
// Make me compile! Execute `rustlings hint modules2` for hints :)
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// modules3.rs
|
||||
// You can use the 'use' keyword to bring module paths from modules from anywere
|
||||
// and espically from the rust standard library. Bring SystemTime and UNIX_EPOCH
|
||||
// You can use the 'use' keyword to bring module paths from modules from anywhere
|
||||
// and especially from the Rust standard library into your scope.
|
||||
// Bring SystemTime and UNIX_EPOCH
|
||||
// from the std::time module. Bonus style points if you can do it with one line!
|
||||
// Make me compile! Execute `rustlings hint modules3` for hints :)
|
||||
|
||||
|
||||
@ -373,9 +373,9 @@ name = "modules3"
|
||||
path = "exercises/modules/modules3.rs"
|
||||
mode = "compile"
|
||||
hint = """
|
||||
UNIX_EPOCH and SystemTime declared in the std::time module, add a use statement
|
||||
UNIX_EPOCH and SystemTime are declared in the std::time module. Add a use statement
|
||||
for these two to bring them into scope. You can use nested paths or the glob
|
||||
operator to bring these two in one line
|
||||
operator to bring these two in using only one line.
|
||||
"""
|
||||
|
||||
# COLLECTIONS
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user