misc: Remove unnecessary "extern crate"

Now all crates use edition = "2018" then the majority of the "extern
crate" statements can be removed. Only those for importing macros need
to remain.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-05-11 14:48:02 +00:00
committed by Sebastien Boeuf
parent 1205bce0ef
commit 496ceed1d0
35 changed files with 2 additions and 140 deletions

View File

@@ -17,7 +17,6 @@ use super::{
VirtioCommon, VirtioDevice, VirtioDeviceType, EPOLL_HELPER_EVENT_LAST, VIRTIO_F_VERSION_1,
};
use crate::seccomp_filters::{get_seccomp_filter, Thread};
use crate::vm_memory::GuestMemory;
use crate::{VirtioInterrupt, VirtioInterruptType};
use libc::EFD_NONBLOCK;
use seccomp::{SeccompAction, SeccompFilter};
@@ -29,6 +28,7 @@ use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
use std::sync::mpsc;
use std::sync::{Arc, Barrier, Mutex};
use std::thread;
use vm_memory::GuestMemory;
use vm_memory::{
Address, ByteValued, Bytes, GuestAddress, GuestAddressSpace, GuestMemoryAtomic,
GuestMemoryError, GuestMemoryMmap,

View File

@@ -10,21 +10,12 @@
//! Implements virtio devices, queues, and transport mechanisms.
extern crate arc_swap;
extern crate epoll;
#[macro_use]
extern crate event_monitor;
#[macro_use]
extern crate log;
extern crate pci;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate vhost;
extern crate virtio_bindings;
extern crate vm_device;
extern crate vm_memory;
use std::convert::TryInto;
use std::io;

View File

@@ -5,7 +5,6 @@
// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
extern crate byteorder;
use crate::{Queue, VirtioDevice};
use byteorder::{ByteOrder, LittleEndian};

View File

@@ -6,11 +6,6 @@
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
extern crate pci;
extern crate vm_allocator;
extern crate vm_memory;
extern crate vmm_sys_util;
use super::VirtioPciCommonConfig;
use crate::transport::VirtioTransport;
use crate::{

View File

@@ -1,12 +1,6 @@
// Copyright 2019 Intel Corporation. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
extern crate epoll;
extern crate net_util;
extern crate vhost;
extern crate virtio_bindings;
extern crate vm_memory;
use std::io;
use vhost::Error as VhostError;
use vm_memory::Error as MmapError;