Commit fcfebe1417d57e52db9b34145016b437dc7c99eb

Steven Salaun 2022-08-08T14:10:39

clippy

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/rfc.rs b/src/rfc.rs
index 2ad076d..d55bc74 100644
--- a/src/rfc.rs
+++ b/src/rfc.rs
@@ -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(())