diff --git a/devices/src/register_space/register.rs b/devices/src/register_space/register.rs index 268b94528d..c2f5184b1b 100644 --- a/devices/src/register_space/register.rs +++ b/devices/src/register_space/register.rs @@ -448,7 +448,7 @@ mod tests { #[test] fn static_register_interface_test() { - let r: Box = Box::new(static_register! { + let r: Box = Box::new(static_register! { ty: u8, offset: 3, value: 32, diff --git a/devices/src/utils/event_loop.rs b/devices/src/utils/event_loop.rs index 405c543941..6db8d0e0c4 100644 --- a/devices/src/utils/event_loop.rs +++ b/devices/src/utils/event_loop.rs @@ -236,7 +236,7 @@ mod tests { cvar: Condvar::new(), evt, }); - let t: Arc = h.clone(); + let t: Arc = h.clone(); l.add_event( &h.evt, WatchingEvents::empty().set_read(), diff --git a/devices/src/virtio/block.rs b/devices/src/virtio/block.rs index b17186413a..a76a3b32eb 100644 --- a/devices/src/virtio/block.rs +++ b/devices/src/virtio/block.rs @@ -284,7 +284,7 @@ impl Worker { fn process_one_request( avail_desc: DescriptorChain, read_only: bool, - disk: &mut DiskFile, + disk: &mut dyn DiskFile, disk_size: u64, flush_timer: &mut TimerFd, flush_timer_armed: &mut bool, @@ -571,7 +571,7 @@ impl Block { fn execute_request( avail_desc: DescriptorChain, read_only: bool, - disk: &mut DiskFile, + disk: &mut dyn DiskFile, disk_size: u64, flush_timer: &mut TimerFd, flush_timer_armed: &mut bool, diff --git a/gpu_display/src/lib.rs b/gpu_display/src/lib.rs index 1bf9578016..3067c0eb73 100644 --- a/gpu_display/src/lib.rs +++ b/gpu_display/src/lib.rs @@ -159,7 +159,7 @@ trait DisplayT: AsRawFd { /// The user of `GpuDisplay` can use `AsRawFd` to poll on the compositor connection's file /// descriptor. When the connection is readable, `dispatch_events` can be called to process it. pub struct GpuDisplay { - inner: Box, + inner: Box, } impl GpuDisplay { diff --git a/qcow_utils/src/qcow_utils.rs b/qcow_utils/src/qcow_utils.rs index 1dcf2a450b..6f11c663c0 100644 --- a/qcow_utils/src/qcow_utils.rs +++ b/qcow_utils/src/qcow_utils.rs @@ -77,7 +77,7 @@ pub unsafe extern "C" fn expand_disk_image(path: *const c_char, virtual_size: u6 Err(_) => return -EINVAL, }; - let mut disk_image: Box = match image_type { + let mut disk_image: Box = match image_type { ImageType::Raw => Box::new(raw_image), ImageType::Qcow2 => match QcowFile::from(raw_image) { Ok(f) => Box::new(f), diff --git a/resources/src/gpu_allocator.rs b/resources/src/gpu_allocator.rs index a44d3c8755..478d0d4f3e 100644 --- a/resources/src/gpu_allocator.rs +++ b/resources/src/gpu_allocator.rs @@ -111,7 +111,8 @@ impl GpuMemoryAllocator for GpuBufferDevice { } #[cfg(feature = "wl-dmabuf")] -pub fn create_gpu_memory_allocator() -> Result>, GpuAllocatorError> { +pub fn create_gpu_memory_allocator( +) -> Result>, GpuAllocatorError> { let undesired: &[&str] = &["vgem", "pvr"]; let fd = gpu_buffer::rendernode::open_device(undesired) .map_err(|_| GpuAllocatorError::OpenGpuBufferDevice)?; diff --git a/sys_util/src/lib.rs b/sys_util/src/lib.rs index 0dab89dc28..8428429faa 100644 --- a/sys_util/src/lib.rs +++ b/sys_util/src/lib.rs @@ -326,7 +326,7 @@ pub fn validate_raw_fd(raw_fd: RawFd) -> Result { /// /// On an error, such as an invalid or incompatible FD, this will return false, which can not be /// distinguished from a non-ready to read FD. -pub fn poll_in(fd: &AsRawFd) -> bool { +pub fn poll_in(fd: &dyn AsRawFd) -> bool { let mut fds = libc::pollfd { fd: fd.as_raw_fd(), events: libc::POLLIN,