forked from rust-lang/rustlings
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadditional1.toml
36 lines (31 loc) · 1.19 KB
/
additional1.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[[exercises]]
name = "primitive_types2"
path = "exercises/04_primitive_types/primitive_types2.rs"
mode = "compile"
hint = "No hints this time ;)"
[[exercises]]
name = "primitive_types3"
path = "exercises/04_primitive_types/primitive_types3.rs"
mode = "compile"
hint = """
There's a shorthand to initialize Arrays with a certain size that does not
require you to type in 100 items (but you certainly can if you want!).
For example, you can do:
```
let array = ["Are we there yet?"; 10];
```
Bonus: what are some other things you could have that would return `true`
for `a.len() >= 100`?"""
[[exercises]]
name = "primitive_types4"
path = "exercises/04_primitive_types/primitive_types4.rs"
mode = "test"
hint = """
Take a look at the 'Understanding Ownership -> Slices -> Other Slices' section
of the book: https://doc.rust-lang.org/book/ch04-03-slices.html and use the
starting and ending (plus one) indices of the items in the `Array` that you
want to end up in the slice.
If you're curious why the first argument of `assert_eq!` does not have an
ampersand for a reference since the second argument is areference, take a look
at the coercion chapter of the nomicon:
https://doc.rust-lang.org/nomicon/coercions.html"""