summaryrefslogtreecommitdiff
path: root/exercises/iterators/iterators3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/iterators/iterators3.rs')
-rw-r--r--exercises/iterators/iterators3.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/exercises/iterators/iterators3.rs b/exercises/iterators/iterators3.rs
index c97a625..29fa23a 100644
--- a/exercises/iterators/iterators3.rs
+++ b/exercises/iterators/iterators3.rs
@@ -1,10 +1,13 @@
// iterators3.rs
-// This is a bigger exercise than most of the others! You can do it!
-// Here is your mission, should you choose to accept it:
+//
+// This is a bigger exercise than most of the others! You can do it! Here is
+// your mission, should you choose to accept it:
// 1. Complete the divide function to get the first four tests to pass.
// 2. Get the remaining tests to pass by completing the result_with_list and
// list_of_results functions.
-// Execute `rustlings hint iterators3` or use the `hint` watch subcommand for a hint.
+//
+// Execute `rustlings hint iterators3` or use the `hint` watch subcommand for a
+// hint.
// I AM NOT DONE
@@ -26,14 +29,16 @@ pub fn divide(a: i32, b: i32) -> Result<i32, DivisionError> {
todo!();
}
-// Complete the function and return a value of the correct type so the test passes.
+// Complete the function and return a value of the correct type so the test
+// passes.
// Desired output: Ok([1, 11, 1426, 3])
fn result_with_list() -> () {
let numbers = vec![27, 297, 38502, 81];
let division_results = numbers.into_iter().map(|n| divide(n, 27));
}
-// Complete the function and return a value of the correct type so the test passes.
+// Complete the function and return a value of the correct type so the test
+// passes.
// Desired output: [Ok(1), Ok(11), Ok(1426), Ok(3)]
fn list_of_results() -> () {
let numbers = vec![27, 297, 38502, 81];