From b5073bec8959d7dd04f335ec047b2dd46bc5977a Mon Sep 17 00:00:00 2001 From: saji Date: Thu, 18 Jul 2024 15:51:07 -0500 Subject: [PATCH] format --- src/display.rs | 12 ++++++------ src/imageproc.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/display.rs b/src/display.rs index 2c45192..2486acb 100644 --- a/src/display.rs +++ b/src/display.rs @@ -3,14 +3,14 @@ use linux_embedded_hal::spidev::SpiModeFlags; use linux_embedded_hal::spidev::SpidevOptions; use linux_embedded_hal::{CdevPin, Delay, SpidevDevice}; -use linux_embedded_hal::gpio_cdev::{Chip, LineRequestFlags}; use anyhow::Result; +use linux_embedded_hal::gpio_cdev::{Chip, LineRequestFlags}; pub struct Wrapper { spi: SpidevDevice, gpiochip: Chip, delay: Delay, - panel: Epd7in3f + panel: Epd7in3f, } impl Wrapper { @@ -46,11 +46,12 @@ impl Wrapper { spi, gpiochip, delay, - panel + panel, }) } - pub fn display(&mut self, buf: &[u8]) -> Result<()>{ - self.panel.update_and_display_frame(&mut self.spi, buf, &mut self.delay)?; + pub fn display(&mut self, buf: &[u8]) -> Result<()> { + self.panel + .update_and_display_frame(&mut self.spi, buf, &mut self.delay)?; self.panel.sleep(&mut self.spi, &mut self.delay)?; Ok(()) } @@ -60,4 +61,3 @@ impl Wrapper { Ok(()) } } - diff --git a/src/imageproc.rs b/src/imageproc.rs index fd23107..7a7edfa 100644 --- a/src/imageproc.rs +++ b/src/imageproc.rs @@ -1,8 +1,8 @@ use image::RgbImage; use image::Rgb as imgRgb; -use palette::color_difference::{Ciede2000, EuclideanDistance}; -use palette::{cast::FromComponents, IntoColor, Lab, Oklch, Srgb}; +use palette::color_difference::Ciede2000; +use palette::{cast::FromComponents, IntoColor, Lab, Srgb}; /// Palette used on the display; pixels can be one of these colors. ///