chore: remove unused variable

This commit is contained in:
eneller
2024-09-09 14:39:49 +02:00
parent 0c4b73276c
commit 862ff2710f

View File

@@ -4,7 +4,7 @@ use serialport::SerialPort;
const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
const HEARTBEAT_MESSAGE: &str = "OK";
const WATCHDOG_DEVICE: &str = "/dev/watchdog";
const WATCHDOG_DEVICE: &str = "/dev/watchdog0";
fn main() {
@@ -22,7 +22,7 @@ fn setup() -> Box<dyn SerialPort>{
fn repeat(mut port:Box<dyn SerialPort>){
loop {
match port.write(HEARTBEAT_MESSAGE.as_bytes()) {
Ok(bytes) => (),
Ok(_) => (),
// TODO log timeout error?
Err(ref e) if e.kind() == io::ErrorKind::TimedOut => (),
Err(e) => eprintln!("{:?}", e),