Skip to content

Commit a3a554a

Browse files
authored
Hints for structs1 and structs2 (#355)
1 parent 6c3cc2c commit a3a554a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

info.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,22 @@ Now you have another tool in your toolbox!"""
215215
name = "structs1"
216216
path = "exercises/structs/structs1.rs"
217217
mode = "test"
218-
hint = "No hints this time ;)"
218+
hint = """
219+
Rust has more than one type of struct. Both variants are used to package related data together.
220+
On the one hand, there are normal, or classic, structs. These are named collections of related data stored in fields.
221+
The other variant is tuple structs. Basically just named tuples.
222+
In this exercise you need to implement one of each kind.
223+
224+
Read more about structs in The Book: https://doc.rust-lang.org/stable/book/ch05-00-structs.html"""
219225

220226
[[exercises]]
221227
name = "structs2"
222228
path = "exercises/structs/structs2.rs"
223229
mode = "test"
224-
hint = "No hints this time ;)"
230+
hint = """
231+
Creating instances of structs is easy, all you need to do is assign some values to its fields.
232+
There is however some shortcuts that can be taken when instantiating structs.
233+
Have a look in The Book, to find out more: https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax"""
225234

226235
# STRINGS
227236

0 commit comments

Comments
 (0)