From 1eb9b55dd0695442aba5a6c873cc88223dbe5211 Mon Sep 17 00:00:00 2001 From: Sebastian Urban Date: Sat, 19 Aug 2023 11:09:27 +0200 Subject: [PATCH] Fix clippy warnings --- openemc-firmware/src/watchman.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openemc-firmware/src/watchman.rs b/openemc-firmware/src/watchman.rs index da263d9..331b3ae 100644 --- a/openemc-firmware/src/watchman.rs +++ b/openemc-firmware/src/watchman.rs @@ -36,11 +36,7 @@ impl Watchman { /// Unlocks access to `set_*` functions. pub fn unlock(&mut self, unlock_code: u64) { - if unlock_code == Self::UNLOCK_CODE { - self.unlocked = true; - } else { - self.unlocked = false; - } + self.unlocked = unlock_code == Self::UNLOCK_CODE; } /// Returns whether access to `set_*` functions is unlocked.