Skip to content

Commit

Permalink
Update validation.rs (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabify authored and Keats committed Feb 2, 2022
1 parent 6f05ec9 commit 9fd9db5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub fn validate(claims: &Map<String, Value>, options: &Validation) -> Result<()>
}
Value::Array(_) => {
let provided_aud: HashSet<String> = from_value(aud.clone())?;
if provided_aud.intersection(correct_aud).count() == 0 {
if provided_aud.intersection(correct_aud).next().is_none() {
return Err(new_error(ErrorKind::InvalidAudience));
}
}
Expand Down

0 comments on commit 9fd9db5

Please sign in to comment.