summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@chromium.org>2019-04-12 11:54:28 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-15 02:06:06 -0700
commitdc63ca9bfefae3da7b66fce3a0089cd930f7b4e7 (patch)
treee2902ae15e15af4ed2fb0db874fa012daa01cacc
parent4c706a2c4eb94a4627bbeb0206d964b81bfb950f (diff)
downloadcrosvm-dc63ca9bfefae3da7b66fce3a0089cd930f7b4e7.tar
crosvm-dc63ca9bfefae3da7b66fce3a0089cd930f7b4e7.tar.gz
crosvm-dc63ca9bfefae3da7b66fce3a0089cd930f7b4e7.tar.bz2
crosvm-dc63ca9bfefae3da7b66fce3a0089cd930f7b4e7.tar.lz
crosvm-dc63ca9bfefae3da7b66fce3a0089cd930f7b4e7.tar.xz
crosvm-dc63ca9bfefae3da7b66fce3a0089cd930f7b4e7.tar.zst
crosvm-dc63ca9bfefae3da7b66fce3a0089cd930f7b4e7.zip
devices: Replace imports involving super::super
I find that imports get disorienting when they refer to super::super or
beyond and are better written as relative to the crate root.

TEST=cargo check --all-features --tests

Change-Id: I96dfd09a2784046669ae57a05f83582203a9c29d
Reviewed-on: https://chromium-review.googlesource.com/1565727
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
-rw-r--r--devices/src/virtio/gpu/backend.rs2
-rw-r--r--devices/src/virtio/vhost/net.rs2
-rw-r--r--devices/src/virtio/vhost/vsock.rs2
-rw-r--r--devices/src/virtio/vhost/worker.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/devices/src/virtio/gpu/backend.rs b/devices/src/virtio/gpu/backend.rs
index 46cd3d1..b0289ae 100644
--- a/devices/src/virtio/gpu/backend.rs
+++ b/devices/src/virtio/gpu/backend.rs
@@ -23,10 +23,10 @@ use gpu_renderer::{
     Renderer, Resource as GpuRendererResource, ResourceCreateArgs,
 };
 
-use super::super::resource_bridge::*;
 use super::protocol::{
     GpuResponse, GpuResponsePlaneInfo, VIRTIO_GPU_CAPSET_VIRGL, VIRTIO_GPU_CAPSET_VIRGL2,
 };
+use crate::virtio::resource_bridge::*;
 
 const DEFAULT_WIDTH: u32 = 1280;
 const DEFAULT_HEIGHT: u32 = 1024;
diff --git a/devices/src/virtio/vhost/net.rs b/devices/src/virtio/vhost/net.rs
index ba5f56d..15907f2 100644
--- a/devices/src/virtio/vhost/net.rs
+++ b/devices/src/virtio/vhost/net.rs
@@ -16,9 +16,9 @@ use ::vhost::NetT as VhostNetT;
 use sys_util::{EventFd, GuestMemory};
 use virtio_sys::{vhost, virtio_net};
 
-use super::super::{Queue, VirtioDevice, TYPE_NET};
 use super::worker::Worker;
 use super::{Error, Result};
+use crate::virtio::{Queue, VirtioDevice, TYPE_NET};
 
 const QUEUE_SIZE: u16 = 256;
 const NUM_QUEUES: usize = 2;
diff --git a/devices/src/virtio/vhost/vsock.rs b/devices/src/virtio/vhost/vsock.rs
index 1ffd078..008d920 100644
--- a/devices/src/virtio/vhost/vsock.rs
+++ b/devices/src/virtio/vhost/vsock.rs
@@ -13,9 +13,9 @@ use ::vhost::Vsock as VhostVsockHandle;
 use sys_util::{EventFd, GuestMemory};
 use virtio_sys::vhost;
 
-use super::super::{Queue, VirtioDevice, TYPE_VSOCK};
 use super::worker::Worker;
 use super::{Error, Result};
+use crate::virtio::{Queue, VirtioDevice, TYPE_VSOCK};
 
 const QUEUE_SIZE: u16 = 256;
 const NUM_QUEUES: usize = 3;
diff --git a/devices/src/virtio/vhost/worker.rs b/devices/src/virtio/vhost/worker.rs
index e9ee2fb..88ad7e3 100644
--- a/devices/src/virtio/vhost/worker.rs
+++ b/devices/src/virtio/vhost/worker.rs
@@ -9,8 +9,8 @@ use std::sync::Arc;
 use sys_util::{EventFd, PollContext, PollToken};
 use vhost::Vhost;
 
-use super::super::{Queue, INTERRUPT_STATUS_USED_RING};
 use super::{Error, Result};
+use crate::virtio::{Queue, INTERRUPT_STATUS_USED_RING};
 
 /// Worker that takes care of running the vhost device.  This mainly involves forwarding interrupts
 /// from the vhost driver to the guest VM because crosvm only supports the virtio-mmio transport,