mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
virtio-devices: Fix beta clippy issue
error: use of a fallible conversion when an infallible one could be used
Error: --> virtio-devices/src/vhost_user/vu_common_ctrl.rs:206:51
|
206 | let actual_size: usize = queue.size().try_into().unwrap();
| ^^^^^^^^^^^^^^^^^^^ help: use: `into()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
= note: `-D clippy::unnecessary-fallible-conversions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_fallible_conversions)]`
error: could not compile `virtio-devices` (lib) due to previous error
Error: warning: build failed, waiting for other jobs to finish...
error: could not compile `virtio-devices` (lib test) due to previous error
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit d4a163dd39
)
This commit is contained in:
parent
7b46d06171
commit
758930bc65
@ -7,7 +7,6 @@ use crate::{
|
||||
get_host_address_range, GuestMemoryMmap, GuestRegionMmap, MmapRegion, VirtioInterrupt,
|
||||
VirtioInterruptType,
|
||||
};
|
||||
use std::convert::TryInto;
|
||||
use std::ffi;
|
||||
use std::fs::File;
|
||||
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
|
||||
@ -201,7 +200,7 @@ impl VhostUserHandle {
|
||||
|
||||
let mut vrings_info = Vec::new();
|
||||
for (queue_index, queue, queue_evt) in queues.iter() {
|
||||
let actual_size: usize = queue.size().try_into().unwrap();
|
||||
let actual_size: usize = queue.size().into();
|
||||
|
||||
let config_data = VringConfigData {
|
||||
queue_max_size: queue.max_size(),
|
||||
|
Loading…
Reference in New Issue
Block a user