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

View File

@@ -437,10 +437,10 @@ impl VsockMuxer {
if let Some(EpollListener::LocalStream(stream)) = self.listener_map.get_mut(&fd) {
let port = Self::read_local_stream_port(&mut self.partial_command_map, stream);
if let Err(Error::UnixRead(ref e)) = port {
if e.kind() == ErrorKind::WouldBlock {
return;
}
if let Err(Error::UnixRead(ref e)) = port
&& e.kind() == ErrorKind::WouldBlock
{
return;
}
let stream = match self.remove_listener(fd) {

View File

@@ -111,11 +111,12 @@ impl MuxerKillQ {
/// the queue has expired. Otherwise, `None` is returned.
///
pub fn pop(&mut self) -> Option<ConnMapKey> {
if let Some(item) = self.q.front() {
if Instant::now() > item.kill_time {
return Some(self.q.pop_front().unwrap().key);
}
if let Some(item) = self.q.front()
&& Instant::now() > item.kill_time
{
return Some(self.q.pop_front().unwrap().key);
}
None
}