From 1b7f3ed23505b83343b376c8d8777366457402d0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 12 Mar 2019 20:49:35 -0700 Subject: [PATCH] edition: Update devices crate to 2018 edition Separated out of CL:1513058 to make it possible to land parts individually while the affected crate has no other significant CLs pending. This avoids repeatedly introducing non-textual conflicts with new code that adds `use` statements. TEST=cargo check TEST=cargo check --all-features TEST=cargo check --target aarch64-unknown-linux-gnu Change-Id: I964a198b54dfa7b98fa2f49a404fda3d09c0f44f Reviewed-on: https://chromium-review.googlesource.com/1519693 Commit-Ready: David Tolnay Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: David Tolnay --- devices/Cargo.toml | 1 + devices/src/ioapic.rs | 2 +- devices/src/virtio/vhost/net.rs | 4 ++-- devices/src/virtio/vhost/vsock.rs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/devices/Cargo.toml b/devices/Cargo.toml index cd554c9b6d..62b570e257 100644 --- a/devices/Cargo.toml +++ b/devices/Cargo.toml @@ -2,6 +2,7 @@ name = "devices" version = "0.1.0" authors = ["The Chromium OS Authors"] +edition = "2018" [features] gpu = ["gpu_buffer", "gpu_display", "gpu_renderer"] diff --git a/devices/src/ioapic.rs b/devices/src/ioapic.rs index d2afb9c40a..61829b615c 100644 --- a/devices/src/ioapic.rs +++ b/devices/src/ioapic.rs @@ -5,9 +5,9 @@ // Implementation of an intel 82093AA Input/Output Advanced Programmable Interrupt Controller // See https://pdos.csail.mit.edu/6.828/2016/readings/ia32/ioapic.pdf for a specification. +use crate::split_irqchip_common::*; use crate::BusDevice; use bit_field::*; -use split_irqchip_common::*; #[bitfield] #[derive(Clone, Copy, PartialEq)] diff --git a/devices/src/virtio/vhost/net.rs b/devices/src/virtio/vhost/net.rs index 2ecef9dd79..ba5f56db7a 100644 --- a/devices/src/virtio/vhost/net.rs +++ b/devices/src/virtio/vhost/net.rs @@ -12,8 +12,8 @@ use std::thread; use net_sys; use net_util::{MacAddress, TapT}; +use ::vhost::NetT as VhostNetT; use sys_util::{EventFd, GuestMemory}; -use vhost::NetT as VhostNetT; use virtio_sys::{vhost, virtio_net}; use super::super::{Queue, VirtioDevice, TYPE_NET}; @@ -220,10 +220,10 @@ where #[cfg(test)] pub mod tests { use super::*; + use ::vhost::net::fakes::FakeNet; use net_util::fakes::FakeTap; use std::result; use sys_util::{GuestAddress, GuestMemory, GuestMemoryError}; - use vhost::net::fakes::FakeNet; fn create_guest_memory() -> result::Result { let start_addr1 = GuestAddress(0x0); diff --git a/devices/src/virtio/vhost/vsock.rs b/devices/src/virtio/vhost/vsock.rs index ff4e5757e3..1ffd0782a3 100644 --- a/devices/src/virtio/vhost/vsock.rs +++ b/devices/src/virtio/vhost/vsock.rs @@ -9,8 +9,8 @@ use std::thread; use byteorder::{ByteOrder, LittleEndian}; +use ::vhost::Vsock as VhostVsockHandle; use sys_util::{EventFd, GuestMemory}; -use vhost::Vsock as VhostVsockHandle; use virtio_sys::vhost; use super::super::{Queue, VirtioDevice, TYPE_VSOCK};