diff options
| author | mo8it <mo8it@proton.me> | 2024-07-22 12:02:59 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-07-22 12:02:59 +0200 |
| commit | 5116a812fbcdf8662934ef35e5d6d0d0794a5d47 (patch) | |
| tree | d524a8d80a61b32c8d46c65ec21136da778485b0 | |
| parent | 82409c060fb8c5a7763c0e7480d8814e1f994ac8 (diff) | |
tests3: Fix panic message
| -rw-r--r-- | exercises/17_tests/tests3.rs | 2 | ||||
| -rw-r--r-- | solutions/17_tests/tests3.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/exercises/17_tests/tests3.rs b/exercises/17_tests/tests3.rs index ec99479..822184e 100644 --- a/exercises/17_tests/tests3.rs +++ b/exercises/17_tests/tests3.rs @@ -9,7 +9,7 @@ impl Rectangle { if width <= 0 || height <= 0 { // Returning a `Result` would be better here. But we want to learn // how to test functions that can panic. - panic!("Rectangle width and height can't be negative"); + panic!("Rectangle width and height must be positive"); } Rectangle { width, height } diff --git a/solutions/17_tests/tests3.rs b/solutions/17_tests/tests3.rs index 503f9bc..487fdc6 100644 --- a/solutions/17_tests/tests3.rs +++ b/solutions/17_tests/tests3.rs @@ -9,7 +9,7 @@ impl Rectangle { if width <= 0 || height <= 0 { // Returning a `Result` would be better here. But we want to learn // how to test functions that can panic. - panic!("Rectangle width and height can't be negative"); + panic!("Rectangle width and height must be positive"); } Rectangle { width, height } |
