Introduce a panic test bug
This commit is contained in:
parent
40d69d9539
commit
d12a578977
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ pub struct Guess {
|
||||||
|
|
||||||
impl Guess {
|
impl Guess {
|
||||||
pub fn new(value: i32) -> Guess {
|
pub fn new(value: i32) -> Guess {
|
||||||
if value < 1 || value > 100 {
|
if value < 1 {
|
||||||
panic!("Guess value must be between 1 and 100, got {value}.");
|
panic!("Guess value must be between 1 and 100, got {value}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue