From 9db4df81703642550650e79335199bd52d32ae29 Mon Sep 17 00:00:00 2001 From: Ryo Kawaguchi Date: Sun, 25 Feb 2024 18:53:36 +0900 Subject: [PATCH] Fix compiler error of the cli example --- examples/cli.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/cli.rs b/examples/cli.rs index fed88b9..ca5b776 100644 --- a/examples/cli.rs +++ b/examples/cli.rs @@ -1,9 +1,7 @@ use core::num::NonZeroU16; /// A cli tool to connect to a device that talks the protocol. use failure::{err_msg, format_err, Error}; -use panel_protocol::{ - ArrayVec, Command, PulseMode, Report, ReportReader, MAX_REPORT_LEN, MAX_REPORT_QUEUE_LEN, -}; +use panel_protocol::{ArrayVec, Command, PulseMode, Report, ReportReader, MAX_REPORT_LEN}; use serial_core::{BaudRate, SerialDevice, SerialPortSettings}; use serial_unix::TTYPort; use std::{ @@ -43,7 +41,7 @@ impl Panel { Ok(Self { tty, protocol, read_buf }) } - fn poll(&mut self) -> Result, Error> { + fn poll(&mut self) -> Result, Error> { match self.tty.read(&mut self.read_buf) { Ok(0) => Err(err_msg("End of file reached")), Ok(count) => self