misc: net_util: drop extern crate, use modern rust

This commit is part of a series of similar commits.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster 2025-09-05 09:20:41 +02:00 committed by Rob Bradford
parent 47dff4f6bc
commit 492f24c632
5 changed files with 4 additions and 3 deletions

View file

@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
use log::{error, info, warn};
use thiserror::Error;
use virtio_bindings::virtio_net::{
VIRTIO_NET_CTRL_GUEST_OFFLOADS, VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, VIRTIO_NET_CTRL_MQ,

View file

@ -5,9 +5,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the THIRD-PARTY file.
#[macro_use]
extern crate log;
mod ctrl_queue;
mod mac;
mod open_tap;

View file

@ -8,6 +8,7 @@
use std::str::FromStr;
use std::{fmt, io};
use log::error;
use serde::de::{Deserialize, Deserializer, Error};
use serde::ser::{Serialize, Serializer};

View file

@ -6,6 +6,7 @@ use std::net::IpAddr;
use std::path::Path;
use std::{fs, io};
use log::warn;
use thiserror::Error;
use super::{MacAddr, Tap, TapError, vnet_hdr_len};

View file

@ -8,6 +8,7 @@ use std::os::unix::io::{AsRawFd, RawFd};
use std::sync::Arc;
use std::sync::atomic::{AtomicU64, Ordering};
use log::{error, info};
use rate_limiter::{RateLimiter, TokenType};
use thiserror::Error;
use virtio_queue::{Queue, QueueOwnedT, QueueT};