Skip to content

Commit

Permalink
Update src/validators/uuid.rs
Browse files Browse the repository at this point in the history
Co-authored-by: David Hewitt <[email protected]>
  • Loading branch information
lig and davidhewitt authored Sep 21, 2023
1 parent 78792c7 commit 4383da7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/validators/uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ impl Validator for UuidValidator {
if let Some(py_input) = input.input_is_instance(class) {
if let Some(expected_version) = self.version {
let py_input_version: Option<usize> = py_input.getattr(intern!(py, "version"))?.extract()?;
if !match py_input_version {
Some(py_input_version) => py_input_version == expected_version,
None => false,
} {
if !matches!(py_input_version, Some(expected_version)) {
return Err(ValError::new(
ErrorType::UuidVersion {
expected_version,
Expand Down

0 comments on commit 4383da7

Please sign in to comment.