mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
vhost_user_block: Address Rust 1.51.0 clippy issue (redundant_slicing)
error: redundant slicing of the whole range --> vhost_user_block/src/lib.rs:396:31 | 396 | right.copy_from_slice(&data[..]); | ^^^^^^^^^ help: use the original slice instead: `data` | = note: `-D clippy::redundant-slicing` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
85ad72490f
commit
7d5d9bdcf4
@ -393,7 +393,7 @@ impl VhostUserBackend for VhostUserBlkBackend {
|
|||||||
return Err(io::Error::from_raw_os_error(libc::EINVAL));
|
return Err(io::Error::from_raw_os_error(libc::EINVAL));
|
||||||
}
|
}
|
||||||
let (_, right) = config_slice.split_at_mut(offset as usize);
|
let (_, right) = config_slice.split_at_mut(offset as usize);
|
||||||
right.copy_from_slice(&data[..]);
|
right.copy_from_slice(&data);
|
||||||
self.update_writeback();
|
self.update_writeback();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user