mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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 <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
3c62fabfc3
commit
e61349c10e
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user