From 05a8954e0a63184e52a4ecc702af2693a8fc18e2 Mon Sep 17 00:00:00 2001 From: auronandace Date: Wed, 17 Jun 2026 13:40:16 +0100 Subject: [PATCH] add and apply unused_io_amount clippy lint --- Cargo.toml | 1 + drivers/executor/src/lib.rs | 2 +- drivers/inputd/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7d188c84e4..573b43bc04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -115,6 +115,7 @@ missing_docs = "allow" #TODO: set to deny when all public functions are document [workspace.lints.clippy] missing_safety_doc = "warn" #TODO: set to deny when all safety documentation is completed precedence = "deny" +unused_io_amount = "deny" [patch.crates-io] redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall.git" } diff --git a/drivers/executor/src/lib.rs b/drivers/executor/src/lib.rs index 6b54e07bc1..80188cce2f 100644 --- a/drivers/executor/src/lib.rs +++ b/drivers/executor/src/lib.rs @@ -187,7 +187,7 @@ impl LocalExecutor { if self.intx { let mut buf = [0_u8; core::mem::size_of::()]; if (&self.irq_handle).read(&mut buf).unwrap() != 0 { - (&self.irq_handle).write(&buf).unwrap(); + (&self.irq_handle).write_all(&buf).unwrap(); } } diff --git a/drivers/inputd/src/lib.rs b/drivers/inputd/src/lib.rs index b68e8211f5..8554f50855 100644 --- a/drivers/inputd/src/lib.rs +++ b/drivers/inputd/src/lib.rs @@ -205,7 +205,7 @@ impl ProducerHandle { } pub fn write_event(&mut self, event: orbclient::Event) -> io::Result<()> { - self.0.write(&event)?; + self.0.write_all(&event)?; Ok(()) } }