Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicelgueta authored Jul 24, 2024
1 parent 8b6f0b4 commit 510df60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mod python {
impl SlugGenerator {
#[new]
fn new(word_length: i32) -> PyResult<Self> {
if word_length < 1 && word_length > 5 {
if word_length < 1 || word_length > 5 {
Err(PyValueError::new_err(
"word_length must be between 1 and 5"
))
Expand Down Expand Up @@ -268,4 +268,4 @@ mod tests {
Err(_e) => assert!(true)
}
}
}
}

0 comments on commit 510df60

Please sign in to comment.