mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
net_util: trim qualified paths
Import the std modules used across the crate instead of spelling the full paths at every use site. 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
4b671954a0
commit
0b3af8aed2
@@ -4,7 +4,7 @@
|
||||
|
||||
use std::net::IpAddr;
|
||||
use std::path::Path;
|
||||
use std::{fs, io};
|
||||
use std::{fs, io, num, result};
|
||||
|
||||
use log::warn;
|
||||
use thiserror::Error;
|
||||
@@ -14,7 +14,7 @@ use super::{MacAddr, Tap, TapError, vnet_hdr_len};
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
#[error("Failed to convert an hexadecimal string into an integer")]
|
||||
ConvertHexStringToInt(#[source] std::num::ParseIntError),
|
||||
ConvertHexStringToInt(#[source] num::ParseIntError),
|
||||
#[error("Error related to the multiqueue support (no support TAP side)")]
|
||||
MultiQueueNoTapSupport,
|
||||
#[error("Error related to the multiqueue support (no support device side)")]
|
||||
@@ -37,7 +37,7 @@ pub enum Error {
|
||||
TapEnable(#[source] TapError),
|
||||
}
|
||||
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
type Result<T> = result::Result<T, Error>;
|
||||
|
||||
fn check_mq_support(if_name: &Option<&str>, queue_pairs: usize) -> Result<()> {
|
||||
if let Some(tap_name) = if_name {
|
||||
|
||||
Reference in New Issue
Block a user