build: treewide: clippy: collapse nested ifs, use let chains

This bumps the MSRV to 1.88 (also, Rust edition 2024 is mandatory).

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2025-08-15 09:00:01 +02:00
committed by Bo Chen
parent f73a6c8d8e
commit c995b72384
40 changed files with 574 additions and 608 deletions
+9 -10
View File
@@ -454,12 +454,11 @@ impl EpollHelperHandler for ConsoleEpollHandler {
}
if self.endpoint.is_pty() {
self.file_event_registered = false;
if event.events & libc::EPOLLHUP as u32 != 0 {
if let Some(pty_write_out) = &self.write_out {
if pty_write_out.load(Ordering::Acquire) {
pty_write_out.store(false, Ordering::Release);
}
}
if event.events & libc::EPOLLHUP as u32 != 0
&& let Some(pty_write_out) = &self.write_out
&& pty_write_out.load(Ordering::Acquire)
{
pty_write_out.store(false, Ordering::Release);
} else {
// If the EPOLLHUP flag is not up on the associated event, we
// can assume the other end of the PTY is connected and therefore
@@ -731,10 +730,10 @@ impl VirtioDevice for Console {
.acked_features
.store(self.common.acked_features, Ordering::Relaxed);
if self.common.feature_acked(VIRTIO_CONSOLE_F_SIZE) {
if let Err(e) = interrupt_cb.trigger(VirtioInterruptType::Config) {
error!("Failed to signal console driver: {:?}", e);
}
if self.common.feature_acked(VIRTIO_CONSOLE_F_SIZE)
&& let Err(e) = interrupt_cb.trigger(VirtioInterruptType::Config)
{
error!("Failed to signal console driver: {:?}", e);
}
let (kill_evt, pause_evt) = self.common.dup_eventfds();