mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
devices: trim qualified paths
Import the modules used in the crate instead of spelling the fully-qualified paths at every use site, and collapse Result<T, io::Error> into io::Result<T>. This covers the feature-gated modules (fw_cfg, ivshmem, pvmemcontrol) as well, leaving the whole crate free of clippy::absolute_paths warnings. Signed-off-by: Henry Hrvoje Tonkovac <htonkovac@gmail.com> Assisted-by: Claude:Opus-4.8
This commit is contained in:
committed by
Rob Bradford
parent
9eff92fb4b
commit
181d29ee90
+2
-1
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
use std::cmp;
|
||||
use std::ops::Range;
|
||||
use std::path::Path;
|
||||
use std::sync::{Arc, Barrier};
|
||||
|
||||
@@ -252,7 +253,7 @@ fn complete_request(regs: &mut [u32; TPM_CRB_R_MAX], success: bool) {
|
||||
}
|
||||
}
|
||||
|
||||
fn data_buffer_range(offset: u32, len: usize, buffer_len: usize) -> Option<std::ops::Range<usize>> {
|
||||
fn data_buffer_range(offset: u32, len: usize, buffer_len: usize) -> Option<Range<usize>> {
|
||||
let end_offset = offset.checked_add(len as u32)?;
|
||||
let buffer_end = CRB_DATA_BUFFER.checked_add(buffer_len as u32)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user