mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: rate_limiter: 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:
committed by
Rob Bradford
parent
2c1eccc6bc
commit
3709105043
@@ -10,6 +10,7 @@ use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{io, result, thread};
|
||||
|
||||
use log::{error, info, warn};
|
||||
use thiserror::Error;
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
|
||||
@@ -43,8 +43,6 @@
|
||||
//! It is meant to be used in an external event loop and thus implements the `AsRawFd`
|
||||
//! trait and provides an *event-handler* as part of its API. This *event-handler*
|
||||
//! needs to be called by the user on every event on the rate limiter's `AsRawFd` FD.
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
use std::io;
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
@@ -52,6 +50,7 @@ use std::sync::Mutex;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use log::error;
|
||||
use thiserror::Error;
|
||||
use vmm_sys_util::timerfd::TimerFd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user