From 4ba89dfb3050061ee6fb83ab755e3f551028a52c Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 2 Sep 2025 20:17:49 +0200 Subject: [PATCH] Fix clippy warnings --- showbits-thermal-printer/src/drawer.rs | 1 + showbits-thermal-printer/src/persistent_printer.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/showbits-thermal-printer/src/drawer.rs b/showbits-thermal-printer/src/drawer.rs index 5d3599c..f5a165b 100644 --- a/showbits-thermal-printer/src/drawer.rs +++ b/showbits-thermal-printer/src/drawer.rs @@ -3,6 +3,7 @@ use tokio::sync::{mpsc, oneshot}; use crate::persistent_printer::PersistentPrinter; +#[expect(clippy::large_enum_variant)] pub enum Command { Backlog, Typst(Typst, oneshot::Sender>), diff --git a/showbits-thermal-printer/src/persistent_printer.rs b/showbits-thermal-printer/src/persistent_printer.rs index 395f04e..ce44a1e 100644 --- a/showbits-thermal-printer/src/persistent_printer.rs +++ b/showbits-thermal-printer/src/persistent_printer.rs @@ -79,10 +79,10 @@ impl PersistentPrinter { pub fn print_backlog(&mut self) -> anyhow::Result<()> { // Don't try to print if the chances of success are zero. - if let Some(file) = &self.printer_file { - if !file.exists() { - return Ok(()); - } + if let Some(file) = &self.printer_file + && !file.exists() + { + return Ok(()); } let mut files = vec![];