mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-28 06:49:19 +00:00
nit: Update tests3.rs
This commit is contained in:
parent
183ed3f88f
commit
13b5a72f21
@ -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 can't be negative or zero");
|
||||
}
|
||||
|
||||
Rectangle { width, height }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user