@@ -748,41 +748,6 @@ can negate the result of what you're doing using `!`, like `assert!(!having_fun(
748
748
749
749
# STANDARD LIBRARY TYPES
750
750
751
- [[exercises ]]
752
- name = " box1"
753
- path = " exercises/standard_library_types/box1.rs"
754
- mode = " test"
755
- hint = """
756
- Step 1
757
- The compiler's message should help: since we cannot store the value of the actual type
758
- when working with recursive types, we need to store a reference (pointer) to its value.
759
- We should, therefore, place our `List` inside a `Box`. More details in the book here:
760
- https://doc.rust-lang.org/book/ch15-01-box.html#enabling-recursive-types-with-boxes
761
-
762
- Step 2
763
- Creating an empty list should be fairly straightforward (hint: peek at the assertions).
764
- For a non-empty list keep in mind that we want to use our Cons "list builder".
765
- Although the current list is one of integers (i32), feel free to change the definition
766
- and try other types!
767
- """
768
-
769
- [[exercises ]]
770
- name = " arc1"
771
- path = " exercises/standard_library_types/arc1.rs"
772
- mode = " compile"
773
- hint = """
774
- Make `shared_numbers` be an `Arc` from the numbers vector. Then, in order
775
- to avoid creating a copy of `numbers`, you'll need to create `child_numbers`
776
- inside the loop but still in the main thread.
777
-
778
- `child_numbers` should be a clone of the Arc of the numbers instead of a
779
- thread-local copy of the numbers.
780
-
781
- This is a simple exercise if you understand the underlying concepts, but if this
782
- is too much of a struggle, consider reading through all of Chapter 16 in the book:
783
- https://doc.rust-lang.org/stable/book/ch16-00-concurrency.html
784
- """
785
-
786
751
[[exercises ]]
787
752
name = " iterators1"
788
753
path = " exercises/standard_library_types/iterators1.rs"
@@ -868,6 +833,41 @@ The fold method can be useful in the count_collection_iterator function.
868
833
For a further challenge, consult the documentation for Iterator to find
869
834
a different method that could make your code more compact than using fold."""
870
835
836
+ [[exercises ]]
837
+ name = " box1"
838
+ path = " exercises/standard_library_types/box1.rs"
839
+ mode = " test"
840
+ hint = """
841
+ Step 1
842
+ The compiler's message should help: since we cannot store the value of the actual type
843
+ when working with recursive types, we need to store a reference (pointer) to its value.
844
+ We should, therefore, place our `List` inside a `Box`. More details in the book here:
845
+ https://doc.rust-lang.org/book/ch15-01-box.html#enabling-recursive-types-with-boxes
846
+
847
+ Step 2
848
+ Creating an empty list should be fairly straightforward (hint: peek at the assertions).
849
+ For a non-empty list keep in mind that we want to use our Cons "list builder".
850
+ Although the current list is one of integers (i32), feel free to change the definition
851
+ and try other types!
852
+ """
853
+
854
+ [[exercises ]]
855
+ name = " arc1"
856
+ path = " exercises/standard_library_types/arc1.rs"
857
+ mode = " compile"
858
+ hint = """
859
+ Make `shared_numbers` be an `Arc` from the numbers vector. Then, in order
860
+ to avoid creating a copy of `numbers`, you'll need to create `child_numbers`
861
+ inside the loop but still in the main thread.
862
+
863
+ `child_numbers` should be a clone of the Arc of the numbers instead of a
864
+ thread-local copy of the numbers.
865
+
866
+ This is a simple exercise if you understand the underlying concepts, but if this
867
+ is too much of a struggle, consider reading through all of Chapter 16 in the book:
868
+ https://doc.rust-lang.org/stable/book/ch16-00-concurrency.html
869
+ """
870
+
871
871
# THREADS
872
872
873
873
[[exercises ]]
0 commit comments