mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block_util, vhost_user_block: Avoid unnecessary literal cast
error: casting integer literal to `u64` is unnecessary --> block_util/src/lib.rs:35:30 | 35 | pub const SECTOR_SIZE: u64 = (0x01 as u64) << SECTOR_SHIFT; | ^^^^^^^^^^^^^ help: try: `0x01_u64` | = note: `-D clippy::unnecessary-cast` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
faba6a3fb3
commit
9f2e7f455f
@@ -32,7 +32,7 @@ use vm_virtio::DescriptorChain;
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
const SECTOR_SHIFT: u8 = 9;
|
||||
pub const SECTOR_SIZE: u64 = (0x01 as u64) << SECTOR_SHIFT;
|
||||
pub const SECTOR_SIZE: u64 = 0x01 << SECTOR_SHIFT;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
|
||||
Reference in New Issue
Block a user