1
1
format_version = 1
2
2
3
- welcome_message = """ Is this your first time? Don't worry, Rustlings is made for beginners!
3
+ welcome_message = """
4
+ Is this your first time? Don't worry, Rustlings is made for beginners!
4
5
We are going to teach you a lot of things about Rust, but before we can
5
6
get started, here are some notes about how Rustlings operates:
6
7
@@ -10,15 +11,16 @@ get started, here are some notes about how Rustlings operates:
10
11
and fix them!
11
12
2. Make sure to have your editor open in the `rustlings/` directory. Rustlings
12
13
will show you the path of the current exercise under the progress bar. Open
13
- the exercise file in your editor, fix errors and save the file. Rustlings will
14
- automatically detect the file change and rerun the exercise. If all errors are
15
- fixed, Rustlings will ask you to move on to the next exercise.
14
+ the exercise file in your editor, fix errors and save the file. Rustlings
15
+ will automatically detect the file change and rerun the exercise. If all
16
+ errors are fixed, Rustlings will ask you to move on to the next exercise.
16
17
3. If you're stuck on an exercise, enter `h` to show a hint.
17
- 4. If an exercise doesn't make sense to you, feel free to open an issue on GitHub!
18
- (https://github.com/rust-lang/rustlings). We look at every issue, and sometimes,
19
- other learners do too so you can help each other out!"""
18
+ 4. If an exercise doesn't make sense to you, feel free to open an issue on
19
+ GitHub! (https://github.com/rust-lang/rustlings). We look at every issue, and
20
+ sometimes, other learners do too so you can help each other out!"""
20
21
21
- final_message = """ We hope you enjoyed learning about the various aspects of Rust!
22
+ final_message = """
23
+ We hope you enjoyed learning about the various aspects of Rust!
22
24
If you noticed any issues, don't hesitate to report them on Github.
23
25
You can also contribute your own exercises to help the greater community!
24
26
@@ -122,8 +124,8 @@ hint = """
122
124
We know about variables and mutability, but there is another important type of
123
125
variables available: constants.
124
126
125
- Constants are always immutable. They are declared with the keyword `const` instead
126
- of `let`.
127
+ Constants are always immutable. They are declared with the keyword `const`
128
+ instead of `let`.
127
129
128
130
The type of Constants must always be annotated.
129
131
@@ -319,7 +321,8 @@ hint = """
319
321
In the first function, we create an empty vector and want to push new elements
320
322
to it.
321
323
322
- In the second function, we map the values of the input and collect them into a vector.
324
+ In the second function, we map the values of the input and collect them into
325
+ a vector.
323
326
324
327
After you've completed both functions, decide for yourself which approach you
325
328
like better.
@@ -332,8 +335,8 @@ What do you think is the more commonly used pattern under Rust developers?"""
332
335
name = " move_semantics1"
333
336
dir = " 06_move_semantics"
334
337
hint = """
335
- So you've got the "cannot borrow `vec` as mutable, as it is not declared as mutable"
336
- error on the line where we push an element to the vector, right?
338
+ So you've got the "cannot borrow `vec` as mutable, as it is not declared as
339
+ mutable" error on the line where we push an element to the vector, right?
337
340
338
341
The fix for this is going to be adding one keyword, and the addition is NOT on
339
342
the line where we push to the vector (where the error is).
@@ -369,7 +372,8 @@ hint = """
369
372
Carefully reason about the range in which each mutable reference is in
370
373
scope. Does it help to update the value of `x` immediately after
371
374
the mutable reference is taken?
372
- Read more about 'Mutable References' in the book's section 'References and Borrowing':
375
+ Read more about 'Mutable References' in the book's section 'References and
376
+ Borrowing':
373
377
https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#mutable-references."""
374
378
375
379
[[exercises ]]
@@ -508,7 +512,8 @@ name = "strings4"
508
512
dir = " 09_strings"
509
513
test = false
510
514
hint = """
511
- Replace `placeholder` with either `string` or `string_slice` in the `main` function.
515
+ Replace `placeholder` with either `string` or `string_slice` in the `main`
516
+ function.
512
517
513
518
Example:
514
519
`placeholder("blue");`
@@ -1200,7 +1205,8 @@ hint = """
1200
1205
Is there an implementation of `TryFrom` in the standard library that can both do
1201
1206
the required integer conversion and check the range of the input?
1202
1207
1203
- Challenge: Can you make the `TryFrom` implementations generic over many integer types?"""
1208
+ Challenge: Can you make the `TryFrom` implementations generic over many integer
1209
+ types?"""
1204
1210
1205
1211
[[exercises ]]
1206
1212
name = " as_ref_mut"
0 commit comments