mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 14:02:22 -05:00
feat(traits): add hint comments
This commit is contained in:
parent
5979d408a9
commit
98b8d3f17d
3 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
// The trait AppendBar has only one function,
|
// The trait AppendBar has only one function,
|
||||||
// which appends "Bar" to any object
|
// which appends "Bar" to any object
|
||||||
// implementing this trait.
|
// implementing this trait.
|
||||||
|
// Execute `rustlings hint traits1` or use the `hint` watch subcommand for a hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
//
|
//
|
||||||
// No boiler plate code this time,
|
// No boiler plate code this time,
|
||||||
// you can do this!
|
// you can do this!
|
||||||
|
// Execute `rustlings hint traits2` or use the `hint` watch subcommand for a hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
|
|
|
@ -698,7 +698,8 @@ path = "exercises/traits/traits2.rs"
|
||||||
mode = "test"
|
mode = "test"
|
||||||
hint = """
|
hint = """
|
||||||
Notice how the trait takes ownership of 'self',and returns `Self'.
|
Notice how the trait takes ownership of 'self',and returns `Self'.
|
||||||
Try mutating the incoming string vector.
|
Try mutating the incoming string vector. Have a look at the tests to see
|
||||||
|
what the result should look like!
|
||||||
|
|
||||||
Vectors provide suitable methods for adding an element at the end. See
|
Vectors provide suitable methods for adding an element at the end. See
|
||||||
the documentation at: https://doc.rust-lang.org/std/vec/struct.Vec.html"""
|
the documentation at: https://doc.rust-lang.org/std/vec/struct.Vec.html"""
|
||||||
|
|
Loading…
Reference in a new issue