Skip to content

Commit 3b384b4

Browse files
authored
Merge pull request #329 from robamu/small_clippy_fix_rtc
2 parents 3a0c163 + 637b318 commit 3b384b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rtc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl Rtcc for Rtc {
354354

355355
fn month(&mut self) -> Result<u8, Self::Error> {
356356
let dr = self.rtc.dr.read();
357-
let mt: u8 = if dr.mt().bit() { 1 } else { 0 };
357+
let mt = u8::from(dr.mt().bit());
358358
let month = bcd2_decode(mt, dr.mu().bits());
359359
Ok(month as u8)
360360
}

0 commit comments

Comments
 (0)