mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 11:25:20 +00:00
vhost_rs: Add clippy override
clippy wants us to use "if let Some(fd) = fd {}" but to combine that with && is an experimental feature. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
2ae3919181
commit
df2516f229
@ -167,9 +167,12 @@ impl VhostBackend for Master {
|
||||
node.wait_for_ack(&hdr).map_err(|e| e.into())
|
||||
}
|
||||
|
||||
// Clippy doesn't seem to know that if let with && is still experimental
|
||||
#[allow(clippy::unnecessary_unwrap)]
|
||||
fn set_log_base(&mut self, base: u64, fd: Option<RawFd>) -> Result<()> {
|
||||
let mut node = self.node.lock().unwrap();
|
||||
let val = VhostUserU64::new(base);
|
||||
|
||||
if node.acked_protocol_features & VhostUserProtocolFeatures::LOG_SHMFD.bits() != 0
|
||||
&& fd.is_some()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user