aboutsummaryrefslogtreecommitdiff
path: root/src/rtc.rs
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2025-11-13 17:50:11 +0100
committerJames Munns <[email protected]>2025-11-13 18:02:50 +0100
commit357a538e8d5f69c8c0aeacfd416f1ad99b0907d3 (patch)
treeaa209bf8dc7d3869f06bd6d5a3368771ee155b68 /src/rtc.rs
parent9387d3352a39a903757860568e41890b022c990f (diff)
autofix clippy lints
Diffstat (limited to 'src/rtc.rs')
-rw-r--r--src/rtc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rtc.rs b/src/rtc.rs
index d62da1f0a..afd46610e 100644
--- a/src/rtc.rs
+++ b/src/rtc.rs
@@ -102,7 +102,7 @@ pub fn convert_seconds_to_datetime(seconds: u32) -> RtcDateTime {
102 days -= days_in_year; 102 days -= days_in_year;
103 year += 1; 103 year += 1;
104 104
105 days_in_year = if year % 4 == 0 { 105 days_in_year = if year.is_multiple_of(4) {
106 DAYS_IN_A_YEAR + 1 106 DAYS_IN_A_YEAR + 1
107 } else { 107 } else {
108 DAYS_IN_A_YEAR 108 DAYS_IN_A_YEAR
@@ -110,7 +110,7 @@ pub fn convert_seconds_to_datetime(seconds: u32) -> RtcDateTime {
110 } 110 }
111 111
112 let mut days_per_month = [0u8, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 112 let mut days_per_month = [0u8, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
113 if year % 4 == 0 { 113 if year.is_multiple_of(4) {
114 days_per_month[2] = 29; 114 days_per_month[2] = 29;
115 } 115 }
116 116