mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio, virtio-devices: Address Rust 1.51.0 clippy issue (upper_case_acronyms)
error: name `TYPE_UNKNOWN` contains a capitalized acronym --> vm-virtio/src/lib.rs:48:5 | 48 | TYPE_UNKNOWN = 0xFF, | ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Type_Unknown` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -333,7 +333,7 @@ where
|
||||
|
||||
Ok(Vsock {
|
||||
common: VirtioCommon {
|
||||
device_type: VirtioDeviceType::TYPE_VSOCK as u32,
|
||||
device_type: VirtioDeviceType::Vsock as u32,
|
||||
avail_features,
|
||||
paused_sync: Some(Arc::new(Barrier::new(2))),
|
||||
queue_sizes: QUEUE_SIZES.to_vec(),
|
||||
@@ -566,10 +566,7 @@ mod tests {
|
||||
(driver_features & 0xffff_ffff) as u32,
|
||||
(driver_features >> 32) as u32,
|
||||
];
|
||||
assert_eq!(
|
||||
ctx.device.device_type(),
|
||||
VirtioDeviceType::TYPE_VSOCK as u32
|
||||
);
|
||||
assert_eq!(ctx.device.device_type(), VirtioDeviceType::Vsock as u32);
|
||||
assert_eq!(ctx.device.queue_max_sizes(), QUEUE_SIZES);
|
||||
assert_eq!(ctx.device.features() as u32, device_pages[0]);
|
||||
assert_eq!((ctx.device.features() >> 32) as u32, device_pages[1]);
|
||||
|
||||
Reference in New Issue
Block a user