Skip to content

Commit 5116a81

Browse files
committed
tests3: Fix panic message
1 parent 82409c0 commit 5116a81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exercises/17_tests/tests3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ impl Rectangle {
99
if width <= 0 || height <= 0 {
1010
// Returning a `Result` would be better here. But we want to learn
1111
// how to test functions that can panic.
12-
panic!("Rectangle width and height can't be negative");
12+
panic!("Rectangle width and height must be positive");
1313
}
1414

1515
Rectangle { width, height }

solutions/17_tests/tests3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ impl Rectangle {
99
if width <= 0 || height <= 0 {
1010
// Returning a `Result` would be better here. But we want to learn
1111
// how to test functions that can panic.
12-
panic!("Rectangle width and height can't be negative");
12+
panic!("Rectangle width and height must be positive");
1313
}
1414

1515
Rectangle { width, height }

0 commit comments

Comments
 (0)