Skip to content

Commit

Permalink
Fix compiler error of the cli example (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
skywhale authored Feb 25, 2024
1 parent 8677226 commit bd11f21
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/cli.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down Expand Up @@ -43,7 +41,7 @@ impl Panel {
Ok(Self { tty, protocol, read_buf })
}

fn poll(&mut self) -> Result<ArrayVec<[Report; MAX_REPORT_QUEUE_LEN]>, Error> {
fn poll(&mut self) -> Result<ArrayVec<Report, MAX_REPORT_LEN>, Error> {
match self.tty.read(&mut self.read_buf) {
Ok(0) => Err(err_msg("End of file reached")),
Ok(count) => self
Expand Down

0 comments on commit bd11f21

Please sign in to comment.