Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiojmendes committed Oct 4, 2024
1 parent bdd6838 commit 7c130a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/door.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ impl<T: OutputPin> Door<'_, T> {
}

pub fn open(&mut self) -> anyhow::Result<()> {
self.driver.set_high()?;
Ok(())
Ok(self.driver.set_high()?)
}

pub fn close(&mut self) -> anyhow::Result<()> {
self.driver.set_low()?;
Ok(())
Ok(self.driver.set_low()?)
}
}
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ fn setup_reader(
let mut keys = Vec::with_capacity(MAX_PIN_LENGTH);

// Reads the queue in a loop.
// If a pin sequence is not entered in PIN_TIMEOUT time
// it will be cancelled
loop {
match channel.recv_timeout(PIN_TIMEOUT) {
Ok(Packet::Key { key }) => {
Expand Down

0 comments on commit 7c130a2

Please sign in to comment.