diff options
author | Joris | 2022-02-26 18:57:55 +0100 |
---|---|---|
committer | Joris | 2022-02-26 18:57:55 +0100 |
commit | f9f49285c5ecc76d3edfb0a54ffab53c2e296d7f (patch) | |
tree | f77f9b625446de7f0b9de1553fc52d702c4cbc69 /src/model/repetition.rs | |
parent | 2d80413609130f1c121dcae39a150a27dd9f02ea (diff) |
Apply linter advices
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 |