Rename smart_pointers and conversions exercises with numeric prefix (Option A)

This commit is contained in:
Jane 2026-05-06 18:04:01 +08:00
parent 4338c58079
commit 5b1edf5f4f
20 changed files with 27 additions and 27 deletions

View File

@ -150,14 +150,14 @@ bin = [
{ name = "iterators4_sol", path = "../solutions/18_iterators/iterators4.rs" }, { name = "iterators4_sol", path = "../solutions/18_iterators/iterators4.rs" },
{ name = "iterators5", path = "../exercises/18_iterators/iterators5.rs" }, { name = "iterators5", path = "../exercises/18_iterators/iterators5.rs" },
{ name = "iterators5_sol", path = "../solutions/18_iterators/iterators5.rs" }, { name = "iterators5_sol", path = "../solutions/18_iterators/iterators5.rs" },
{ name = "1_box1", path = "../exercises/19_smart_pointers/1_box1.rs" }, { name = "smart_pointers1", path = "../exercises/19_smart_pointers/smart_pointers1.rs" },
{ name = "1_box1_sol", path = "../solutions/19_smart_pointers/1_box1.rs" }, { name = "smart_pointers1_sol", path = "../solutions/19_smart_pointers/smart_pointers1.rs" },
{ name = "2_rc1", path = "../exercises/19_smart_pointers/2_rc1.rs" }, { name = "smart_pointers2", path = "../exercises/19_smart_pointers/smart_pointers2.rs" },
{ name = "2_rc1_sol", path = "../solutions/19_smart_pointers/2_rc1.rs" }, { name = "smart_pointers2_sol", path = "../solutions/19_smart_pointers/smart_pointers2.rs" },
{ name = "3_arc1", path = "../exercises/19_smart_pointers/3_arc1.rs" }, { name = "smart_pointers3", path = "../exercises/19_smart_pointers/smart_pointers3.rs" },
{ name = "3_arc1_sol", path = "../solutions/19_smart_pointers/3_arc1.rs" }, { name = "smart_pointers3_sol", path = "../solutions/19_smart_pointers/smart_pointers3.rs" },
{ name = "4_cow1", path = "../exercises/19_smart_pointers/4_cow1.rs" }, { name = "smart_pointers4", path = "../exercises/19_smart_pointers/smart_pointers4.rs" },
{ name = "4_cow1_sol", path = "../solutions/19_smart_pointers/4_cow1.rs" }, { name = "smart_pointers4_sol", path = "../solutions/19_smart_pointers/smart_pointers4.rs" },
{ name = "threads1", path = "../exercises/20_threads/threads1.rs" }, { name = "threads1", path = "../exercises/20_threads/threads1.rs" },
{ name = "threads1_sol", path = "../solutions/20_threads/threads1.rs" }, { name = "threads1_sol", path = "../solutions/20_threads/threads1.rs" },
{ name = "threads2", path = "../exercises/20_threads/threads2.rs" }, { name = "threads2", path = "../exercises/20_threads/threads2.rs" },
@ -178,16 +178,16 @@ bin = [
{ name = "clippy2_sol", path = "../solutions/22_clippy/clippy2.rs" }, { name = "clippy2_sol", path = "../solutions/22_clippy/clippy2.rs" },
{ name = "clippy3", path = "../exercises/22_clippy/clippy3.rs" }, { name = "clippy3", path = "../exercises/22_clippy/clippy3.rs" },
{ name = "clippy3_sol", path = "../solutions/22_clippy/clippy3.rs" }, { name = "clippy3_sol", path = "../solutions/22_clippy/clippy3.rs" },
{ name = "1_using_as", path = "../exercises/23_conversions/1_using_as.rs" }, { name = "conversions1", path = "../exercises/23_conversions/conversions1.rs" },
{ name = "1_using_as_sol", path = "../solutions/23_conversions/1_using_as.rs" }, { name = "conversions1_sol", path = "../solutions/23_conversions/conversions1.rs" },
{ name = "2_from_into", path = "../exercises/23_conversions/2_from_into.rs" }, { name = "conversions2", path = "../exercises/23_conversions/conversions2.rs" },
{ name = "2_from_into_sol", path = "../solutions/23_conversions/2_from_into.rs" }, { name = "conversions2_sol", path = "../solutions/23_conversions/conversions2.rs" },
{ name = "3_from_str", path = "../exercises/23_conversions/3_from_str.rs" }, { name = "conversions3", path = "../exercises/23_conversions/conversions3.rs" },
{ name = "3_from_str_sol", path = "../solutions/23_conversions/3_from_str.rs" }, { name = "conversions3_sol", path = "../solutions/23_conversions/conversions3.rs" },
{ name = "4_try_from_into", path = "../exercises/23_conversions/4_try_from_into.rs" }, { name = "conversions4", path = "../exercises/23_conversions/conversions4.rs" },
{ name = "4_try_from_into_sol", path = "../solutions/23_conversions/4_try_from_into.rs" }, { name = "conversions4_sol", path = "../solutions/23_conversions/conversions4.rs" },
{ name = "5_as_ref_mut", path = "../exercises/23_conversions/5_as_ref_mut.rs" }, { name = "conversions5", path = "../exercises/23_conversions/conversions5.rs" },
{ name = "5_as_ref_mut_sol", path = "../solutions/23_conversions/5_as_ref_mut.rs" }, { name = "conversions5_sol", path = "../solutions/23_conversions/conversions5.rs" },
] ]
[package] [package]

View File

@ -959,7 +959,7 @@ a different method that could make your code more compact than using `fold`."""
# SMART POINTERS # SMART POINTERS
[[exercises]] [[exercises]]
name = "1_box1" name = "smart_pointers1"
dir = "19_smart_pointers" dir = "19_smart_pointers"
hint = """ hint = """
The compiler's message should help: Since we cannot store the value of the 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!""" definition and try other types!"""
[[exercises]] [[exercises]]
name = "2_rc1" name = "smart_pointers2"
dir = "19_smart_pointers" dir = "19_smart_pointers"
hint = """ hint = """
This is a straightforward exercise to use the `Rc<T>` type. Each `Planet` has 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 :(""" Unfortunately, Pluto is no longer considered a planet :("""
[[exercises]] [[exercises]]
name = "3_arc1" name = "smart_pointers3"
dir = "19_smart_pointers" dir = "19_smart_pointers"
test = false test = false
hint = """ hint = """
@ -1010,7 +1010,7 @@ Book:
https://doc.rust-lang.org/book/ch16-00-concurrency.html""" https://doc.rust-lang.org/book/ch16-00-concurrency.html"""
[[exercises]] [[exercises]]
name = "4_cow1" name = "smart_pointers4"
dir = "19_smart_pointers" dir = "19_smart_pointers"
hint = """ hint = """
If `Cow` already owns the data, it doesn't need to clone it when `to_mut()` is 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 # TYPE CONVERSIONS
[[exercises]] [[exercises]]
name = "1_using_as" name = "conversions1"
dir = "23_conversions" dir = "23_conversions"
hint = """ hint = """
Use the `as` operator to cast one of the operands in the last line of the Use the `as` operator to cast one of the operands in the last line of the
`average` function into the expected return type.""" `average` function into the expected return type."""
[[exercises]] [[exercises]]
name = "2_from_into" name = "conversions2"
dir = "23_conversions" dir = "23_conversions"
hint = """ hint = """
Follow the steps provided right before the `From` implementation.""" Follow the steps provided right before the `From` implementation."""
[[exercises]] [[exercises]]
name = "3_from_str" name = "conversions3"
dir = "23_conversions" dir = "23_conversions"
hint = """ hint = """
The implementation of `FromStr` should return an `Ok` with a `Person` object, 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""" https://doc.rust-lang.org/stable/rust-by-example/error/multiple_error_types/reenter_question_mark.html"""
[[exercises]] [[exercises]]
name = "4_try_from_into" name = "conversions4"
dir = "23_conversions" dir = "23_conversions"
hint = """ hint = """
Is there an implementation of `TryFrom` in the standard library that can both do 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?""" types?"""
[[exercises]] [[exercises]]
name = "5_as_ref_mut" name = "conversions5"
dir = "23_conversions" dir = "23_conversions"
hint = """ hint = """
Add `AsRef<str>` or `AsMut<u32>` as a trait bound to the functions.""" Add `AsRef<str>` or `AsMut<u32>` as a trait bound to the functions."""