From 718b8e80d58ebd41c3db5ba3eaec8ef1988b802b Mon Sep 17 00:00:00 2001 From: parrrate Date: Thu, 9 Apr 2026 12:56:15 +0000 Subject: [PATCH] reorganise all_errors --- src/exercises/all_errors.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/exercises/all_errors.md b/src/exercises/all_errors.md index 5e5a311..723a00b 100644 --- a/src/exercises/all_errors.md +++ b/src/exercises/all_errors.md @@ -1,7 +1,6 @@ # Report all errors (or only the first error) -- `only_positive(..., first())` should short-circuit on first non-positive number. -- `only_positive(..., all())` must collect all non-positive numbers. +Make this compile and pass tests: ```rust # trait Collects { @@ -37,3 +36,6 @@ assert_eq!(only_positive(vec![1, 2, 3], first()), Ok(vec![1, 2, 3])); assert_eq!(only_positive(vec![1, -1, 2, -4], all()), Err(vec![-1, -4])); assert_eq!(only_positive(vec![1, 2, 3], all()), Ok(vec![1, 2, 3])); ``` + +- `only_positive(..., first())` should short-circuit on first non-positive number. +- `only_positive(..., all())` must collect all non-positive numbers.