This commit is contained in:
Steven Salaun 2022-08-08 14:10:39 +02:00
parent 6623af9d3e
commit fcfebe1417
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ impl std::fmt::Display for Rfc6238Error {
}
fn assert_digits(digits: &usize) -> Result<(), Rfc6238Error> {
if digits < &6 || digits > &8 {
if !(&6..=&8).contains(&digits) {
Err(Rfc6238Error::InvalidDigits)
} else {
Ok(())