Merge branch 'writeall-instead-of-write' into 'main'

add and apply unused_io_amount clippy lint

See merge request redox-os/base!282
This commit is contained in:
Jeremy Soller
2026-06-25 06:42:23 -06:00
3 changed files with 5 additions and 2 deletions
+1
View File
@@ -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" }
+2 -1
View File
@@ -187,7 +187,8 @@ impl<Hw: Hardware> LocalExecutor<Hw> {
if self.intx {
let mut buf = [0_u8; core::mem::size_of::<usize>()];
if (&self.irq_handle).read(&mut buf).unwrap() != 0 {
(&self.irq_handle).write(&buf).unwrap();
let amount = (&self.irq_handle).write(&buf).unwrap();
assert!(amount == core::mem::size_of::<usize>());
}
}
+2 -1
View File
@@ -205,7 +205,8 @@ impl ProducerHandle {
}
pub fn write_event(&mut self, event: orbclient::Event) -> io::Result<()> {
self.0.write(&event)?;
let amount = self.0.write(&event)?;
assert!(amount == core::mem::size_of::<orbclient::Event>());
Ok(())
}
}