mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-01 16:03:31 +02:00
Rename smart_pointers and conversions exercises with numeric prefix (Option A)
This commit is contained in:
@@ -959,7 +959,7 @@ a different method that could make your code more compact than using `fold`."""
|
||||
# SMART POINTERS
|
||||
|
||||
[[exercises]]
|
||||
name = "1_box1"
|
||||
name = "smart_pointers1"
|
||||
dir = "19_smart_pointers"
|
||||
hint = """
|
||||
The compiler's message should help: Since we cannot store the value of the
|
||||
@@ -976,7 +976,7 @@ Although the current list is one of integers (`i32`), feel free to change the
|
||||
definition and try other types!"""
|
||||
|
||||
[[exercises]]
|
||||
name = "2_rc1"
|
||||
name = "smart_pointers2"
|
||||
dir = "19_smart_pointers"
|
||||
hint = """
|
||||
This is a straightforward exercise to use the `Rc<T>` type. Each `Planet` has
|
||||
@@ -993,7 +993,7 @@ See more at: https://doc.rust-lang.org/book/ch15-04-rc.html
|
||||
Unfortunately, Pluto is no longer considered a planet :("""
|
||||
|
||||
[[exercises]]
|
||||
name = "3_arc1"
|
||||
name = "smart_pointers3"
|
||||
dir = "19_smart_pointers"
|
||||
test = false
|
||||
hint = """
|
||||
@@ -1010,7 +1010,7 @@ Book:
|
||||
https://doc.rust-lang.org/book/ch16-00-concurrency.html"""
|
||||
|
||||
[[exercises]]
|
||||
name = "4_cow1"
|
||||
name = "smart_pointers4"
|
||||
dir = "19_smart_pointers"
|
||||
hint = """
|
||||
If `Cow` already owns the data, it doesn't need to clone it when `to_mut()` is
|
||||
@@ -1161,20 +1161,20 @@ hint = "No hints this time!"
|
||||
# TYPE CONVERSIONS
|
||||
|
||||
[[exercises]]
|
||||
name = "1_using_as"
|
||||
name = "conversions1"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
Use the `as` operator to cast one of the operands in the last line of the
|
||||
`average` function into the expected return type."""
|
||||
|
||||
[[exercises]]
|
||||
name = "2_from_into"
|
||||
name = "conversions2"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
Follow the steps provided right before the `From` implementation."""
|
||||
|
||||
[[exercises]]
|
||||
name = "3_from_str"
|
||||
name = "conversions3"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
The implementation of `FromStr` should return an `Ok` with a `Person` object,
|
||||
@@ -1191,7 +1191,7 @@ operator in your solution, you might want to look at
|
||||
https://doc.rust-lang.org/stable/rust-by-example/error/multiple_error_types/reenter_question_mark.html"""
|
||||
|
||||
[[exercises]]
|
||||
name = "4_try_from_into"
|
||||
name = "conversions4"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
Is there an implementation of `TryFrom` in the standard library that can both do
|
||||
@@ -1201,7 +1201,7 @@ Challenge: Can you make the `TryFrom` implementations generic over many integer
|
||||
types?"""
|
||||
|
||||
[[exercises]]
|
||||
name = "5_as_ref_mut"
|
||||
name = "conversions5"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
Add `AsRef<str>` or `AsMut<u32>` as a trait bound to the functions."""
|
||||
|
||||
Reference in New Issue
Block a user