mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-05-15 09:48:45 +00:00
Rename smart_pointers and conversions exercises with numeric prefix
Update rustlings-macros/info.toml and dev/Cargo.toml accordingly
This commit is contained in:
parent
3bbc3001c9
commit
b215211b07
@ -150,14 +150,14 @@ bin = [
|
||||
{ name = "iterators4_sol", path = "../solutions/18_iterators/iterators4.rs" },
|
||||
{ name = "iterators5", path = "../exercises/18_iterators/iterators5.rs" },
|
||||
{ name = "iterators5_sol", path = "../solutions/18_iterators/iterators5.rs" },
|
||||
{ name = "box1", path = "../exercises/19_smart_pointers/box1.rs" },
|
||||
{ name = "box1_sol", path = "../solutions/19_smart_pointers/box1.rs" },
|
||||
{ name = "rc1", path = "../exercises/19_smart_pointers/rc1.rs" },
|
||||
{ name = "rc1_sol", path = "../solutions/19_smart_pointers/rc1.rs" },
|
||||
{ name = "arc1", path = "../exercises/19_smart_pointers/arc1.rs" },
|
||||
{ name = "arc1_sol", path = "../solutions/19_smart_pointers/arc1.rs" },
|
||||
{ name = "cow1", path = "../exercises/19_smart_pointers/cow1.rs" },
|
||||
{ name = "cow1_sol", path = "../solutions/19_smart_pointers/cow1.rs" },
|
||||
{ name = "1_box1", path = "../exercises/19_smart_pointers/1_box1.rs" },
|
||||
{ name = "1_box1_sol", path = "../solutions/19_smart_pointers/1_box1.rs" },
|
||||
{ name = "2_rc1", path = "../exercises/19_smart_pointers/2_rc1.rs" },
|
||||
{ name = "2_rc1_sol", path = "../solutions/19_smart_pointers/2_rc1.rs" },
|
||||
{ name = "3_arc1", path = "../exercises/19_smart_pointers/3_arc1.rs" },
|
||||
{ name = "3_arc1_sol", path = "../solutions/19_smart_pointers/3_arc1.rs" },
|
||||
{ name = "4_cow1", path = "../exercises/19_smart_pointers/4_cow1.rs" },
|
||||
{ name = "4_cow1_sol", path = "../solutions/19_smart_pointers/4_cow1.rs" },
|
||||
{ name = "threads1", path = "../exercises/20_threads/threads1.rs" },
|
||||
{ name = "threads1_sol", path = "../solutions/20_threads/threads1.rs" },
|
||||
{ name = "threads2", path = "../exercises/20_threads/threads2.rs" },
|
||||
@ -178,16 +178,16 @@ bin = [
|
||||
{ name = "clippy2_sol", path = "../solutions/22_clippy/clippy2.rs" },
|
||||
{ name = "clippy3", path = "../exercises/22_clippy/clippy3.rs" },
|
||||
{ name = "clippy3_sol", path = "../solutions/22_clippy/clippy3.rs" },
|
||||
{ name = "using_as", path = "../exercises/23_conversions/using_as.rs" },
|
||||
{ name = "using_as_sol", path = "../solutions/23_conversions/using_as.rs" },
|
||||
{ name = "from_into", path = "../exercises/23_conversions/from_into.rs" },
|
||||
{ name = "from_into_sol", path = "../solutions/23_conversions/from_into.rs" },
|
||||
{ name = "from_str", path = "../exercises/23_conversions/from_str.rs" },
|
||||
{ name = "from_str_sol", path = "../solutions/23_conversions/from_str.rs" },
|
||||
{ name = "try_from_into", path = "../exercises/23_conversions/try_from_into.rs" },
|
||||
{ name = "try_from_into_sol", path = "../solutions/23_conversions/try_from_into.rs" },
|
||||
{ name = "as_ref_mut", path = "../exercises/23_conversions/as_ref_mut.rs" },
|
||||
{ name = "as_ref_mut_sol", path = "../solutions/23_conversions/as_ref_mut.rs" },
|
||||
{ name = "1_using_as", path = "../exercises/23_conversions/1_using_as.rs" },
|
||||
{ name = "1_using_as_sol", path = "../solutions/23_conversions/1_using_as.rs" },
|
||||
{ name = "2_from_into", path = "../exercises/23_conversions/2_from_into.rs" },
|
||||
{ name = "2_from_into_sol", path = "../solutions/23_conversions/2_from_into.rs" },
|
||||
{ name = "3_from_str", path = "../exercises/23_conversions/3_from_str.rs" },
|
||||
{ name = "3_from_str_sol", path = "../solutions/23_conversions/3_from_str.rs" },
|
||||
{ name = "4_try_from_into", path = "../exercises/23_conversions/4_try_from_into.rs" },
|
||||
{ name = "4_try_from_into_sol", path = "../solutions/23_conversions/4_try_from_into.rs" },
|
||||
{ name = "5_as_ref_mut", path = "../exercises/23_conversions/5_as_ref_mut.rs" },
|
||||
{ name = "5_as_ref_mut_sol", path = "../solutions/23_conversions/5_as_ref_mut.rs" },
|
||||
]
|
||||
|
||||
[package]
|
||||
|
||||
@ -954,7 +954,7 @@ a different method that could make your code more compact than using `fold`."""
|
||||
# SMART POINTERS
|
||||
|
||||
[[exercises]]
|
||||
name = "box1"
|
||||
name = "1_box1"
|
||||
dir = "19_smart_pointers"
|
||||
hint = """
|
||||
The compiler's message should help: Since we cannot store the value of the
|
||||
@ -971,7 +971,7 @@ Although the current list is one of integers (`i32`), feel free to change the
|
||||
definition and try other types!"""
|
||||
|
||||
[[exercises]]
|
||||
name = "rc1"
|
||||
name = "2_rc1"
|
||||
dir = "19_smart_pointers"
|
||||
hint = """
|
||||
This is a straightforward exercise to use the `Rc<T>` type. Each `Planet` has
|
||||
@ -988,7 +988,7 @@ See more at: https://doc.rust-lang.org/book/ch15-04-rc.html
|
||||
Unfortunately, Pluto is no longer considered a planet :("""
|
||||
|
||||
[[exercises]]
|
||||
name = "arc1"
|
||||
name = "3_arc1"
|
||||
dir = "19_smart_pointers"
|
||||
test = false
|
||||
hint = """
|
||||
@ -1005,7 +1005,7 @@ Book:
|
||||
https://doc.rust-lang.org/book/ch16-00-concurrency.html"""
|
||||
|
||||
[[exercises]]
|
||||
name = "cow1"
|
||||
name = "4_cow1"
|
||||
dir = "19_smart_pointers"
|
||||
hint = """
|
||||
If `Cow` already owns the data, it doesn't need to clone it when `to_mut()` is
|
||||
@ -1156,20 +1156,20 @@ hint = "No hints this time!"
|
||||
# TYPE CONVERSIONS
|
||||
|
||||
[[exercises]]
|
||||
name = "using_as"
|
||||
name = "1_using_as"
|
||||
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 = "from_into"
|
||||
name = "2_from_into"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
Follow the steps provided right before the `From` implementation."""
|
||||
|
||||
[[exercises]]
|
||||
name = "from_str"
|
||||
name = "3_from_str"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
The implementation of `FromStr` should return an `Ok` with a `Person` object,
|
||||
@ -1186,7 +1186,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 = "try_from_into"
|
||||
name = "4_try_from_into"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
Is there an implementation of `TryFrom` in the standard library that can both do
|
||||
@ -1196,7 +1196,7 @@ Challenge: Can you make the `TryFrom` implementations generic over many integer
|
||||
types?"""
|
||||
|
||||
[[exercises]]
|
||||
name = "as_ref_mut"
|
||||
name = "5_as_ref_mut"
|
||||
dir = "23_conversions"
|
||||
hint = """
|
||||
Add `AsRef<str>` or `AsMut<u32>` as a trait bound to the functions."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user