mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
build: Fix beta clippy issue (needless_return)
warning: unneeded `return` statement --> pci/src/vfio_user.rs:627:13 | 627 | / return Err(std::io::Error::new( 628 | | std::io::ErrorKind::Other, 629 | | format!("Region not found for 0x{:x}", gpa), 630 | | )); | |_______________^ | = note: `#[warn(clippy::needless_return)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 627 ~ Err(std::io::Error::new( 628 + std::io::ErrorKind::Other, 629 + format!("Region not found for 0x{:x}", gpa), 630 + )) | Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
d7decfd525
commit
b57d7b258d
@ -624,10 +624,10 @@ impl<M: GuestAddressSpace + Sync + Send> ExternalDmaMapping for VfioUserDmaMappi
|
||||
)
|
||||
})
|
||||
} else {
|
||||
return Err(std::io::Error::new(
|
||||
Err(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
format!("Region not found for 0x{:x}", gpa),
|
||||
));
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -363,9 +363,7 @@ impl MultiThreadSingleStep for GdbStub {
|
||||
}
|
||||
match self.vm_request(GdbRequestPayload::Resume, tid_to_cpuid(tid)) {
|
||||
Ok(_) => Ok(()),
|
||||
Err(e) => {
|
||||
return Err(format!("Failed to resume the target: {:?}", e));
|
||||
}
|
||||
Err(e) => Err(format!("Failed to resume the target: {:?}", e)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user