From 29237f0a2cc7d3e114ff93974ecafc7206013664 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Wed, 23 Jun 2021 21:49:46 -0500 Subject: [PATCH] chore(timer): clean up if let statement --- src/timer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/timer.rs b/src/timer.rs index 5617972..433cb0f 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -33,8 +33,8 @@ impl Timer { let timer_enable = self.ctrl.enabled() as u8; let and_result = bit & timer_enable; - if let Some(previous) = self.prev_and_result { - if previous == 0x01 && and_result == 0x00 { + if let Some(0x01) = self.prev_and_result { + if and_result == 0x00 { // Falling Edge, increase TIMA Register self.increment_tima(); }