From 70f9c89c64caa9f3e06c3c18a35157ce89f16162 Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Sun, 25 Feb 2024 05:15:35 +0100 Subject: chore: make clippy happy --- src/machine/keyctrl.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/machine/keyctrl.rs') diff --git a/src/machine/keyctrl.rs b/src/machine/keyctrl.rs index 40385a2..9284534 100644 --- a/src/machine/keyctrl.rs +++ b/src/machine/keyctrl.rs @@ -56,11 +56,11 @@ impl Prefix { impl KeyState { pub fn new() -> Self { - return Self { + Self { modi: Modifiers::NONE, prefix: Prefix::NONE, scan: None, - }; + } } pub fn toggle_capslock(&mut self) { @@ -174,7 +174,7 @@ impl KeyboardController { // TODO maybe there is a path which leads to invalid SR, e.g. timeout? Some(StatusReg::from_bits_truncate(self.cport.inb())) } - + // this should be called by the interrupt handler prologue pub fn fetch_key(&mut self) { // I'd like to see if this panics.... @@ -185,12 +185,12 @@ impl KeyboardController { } self.update_state(self.dport.inb()); } - + // this should be called by the "epilogue" - pub fn consume_key(&mut self) -> Option{ + pub fn consume_key(&mut self) -> Option { let res = self.gather.clone(); self.gather = None; - return res + res } pub fn decode_key(&mut self) { -- cgit v1.2.3-70-g09d2