Skip to content

Commit

Permalink
chore: Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
polyfloyd committed Jun 26, 2024
1 parent ddc9782 commit 183e57b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 0 additions & 9 deletions src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ pub trait Device: Send {
fn color_correction(&self) -> Correction {
Correction::none()
}

fn written_frame_size(&self, num_pixels: usize) -> usize {
let mut buf = Vec::new();
let dummy_frame: Vec<Pixel> = (0..num_pixels)
.map(|_| Pixel { r: 0, g: 0, b: 0 })
.collect();
self.write_frame(&mut buf, dummy_frame.as_slice()).unwrap();
buf.len()
}
}

impl<T> Device for Box<T>
Expand Down
9 changes: 8 additions & 1 deletion src/driver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ impl fmt::Display for Error {
}
}

impl error::Error for Error {}
impl error::Error for Error {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
match &self {
Self::Io(err) => Some(err),
Self::Nix(err) => Some(err),
}
}
}

impl From<io::Error> for Error {
fn from(err: io::Error) -> Self {
Expand Down

0 comments on commit 183e57b

Please sign in to comment.