From e61349c10e83c9bdf8d53b5d514db955290d0db8 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 6 Mar 2026 00:31:21 +0100 Subject: [PATCH] vmm: gdb: Use map_or instead of map().unwrap_or() Do the necessary replacement to satisfy clippy::map_unwrap_or. Signed-off-by: Anatol Belski --- vmm/src/gdb.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm/src/gdb.rs b/vmm/src/gdb.rs index fc24767d9..82a5d63a9 100644 --- a/vmm/src/gdb.rs +++ b/vmm/src/gdb.rs @@ -484,7 +484,7 @@ impl run_blocking::BlockingEventLoop for GdbEventLoop { } } - if conn.peek().map(|b| b.is_some()).unwrap_or(true) { + if conn.peek().map_or(true, |b| b.is_some()) { let byte = conn .read() .map_err(run_blocking::WaitForStopReasonError::Connection)?;