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
1 changed files with 1 additions and 1 deletions
|
|
@ -393,7 +393,7 @@ impl VhostUserBackend for VhostUserBlkBackend {
|
|||
return Err(io::Error::from_raw_os_error(libc::EINVAL));
|
||||
}
|
||||
let (_, right) = config_slice.split_at_mut(offset as usize);
|
||||
right.copy_from_slice(&data[..]);
|
||||
right.copy_from_slice(&data);
|
||||
self.update_writeback();
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue