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:
Henry Hrvoje Tonkovac
2026-06-06 20:43:35 +02:00
committed by Rob Bradford
parent 4b671954a0
commit 0b3af8aed2
6 changed files with 24 additions and 23 deletions

View File

@@ -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 {