diff options
Diffstat (limited to 'src/model/repetition.rs')
-rw-r--r-- | src/model/repetition.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/repetition.rs b/src/model/repetition.rs index ceb903b..d21dd70 100644 --- a/src/model/repetition.rs +++ b/src/model/repetition.rs @@ -16,7 +16,7 @@ pub enum DayOfMonth { pub fn validate_day(str: &str) -> Option<u8> { let n = str.parse::<u8>().ok()?; - if n >= 1 && n <= 31 { + if (1..=31).contains(&n) { Some(n) } else { None |