summary refs log tree commit diff
path: root/devices
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2019-07-22 22:12:09 -0700
committerCommit Bot <commit-bot@chromium.org>2019-07-24 02:22:23 +0000
commite19cae8c6a9504b66c4eba74c59560302ab405f0 (patch)
treec8fca531ae6b2fb609f323cfd2bb046538288d93 /devices
parentc3bee1f8c3fcfc9f62ab858cf0f0c58a373d2855 (diff)
downloadcrosvm-e19cae8c6a9504b66c4eba74c59560302ab405f0.tar
crosvm-e19cae8c6a9504b66c4eba74c59560302ab405f0.tar.gz
crosvm-e19cae8c6a9504b66c4eba74c59560302ab405f0.tar.bz2
crosvm-e19cae8c6a9504b66c4eba74c59560302ab405f0.tar.lz
crosvm-e19cae8c6a9504b66c4eba74c59560302ab405f0.tar.xz
crosvm-e19cae8c6a9504b66c4eba74c59560302ab405f0.tar.zst
crosvm-e19cae8c6a9504b66c4eba74c59560302ab405f0.zip
tree-wide: Use new trait object syntax
A few places were using the old syntax without `dyn`. Nightly compilers
have started warning more aggressively, so fix up the last of those.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: I4df49b4a27a62acfd8c542cec903e4c5b31bedcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1715576
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'devices')
-rw-r--r--devices/src/virtio/descriptor_utils.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/devices/src/virtio/descriptor_utils.rs b/devices/src/virtio/descriptor_utils.rs
index 0656c06..141c4bf 100644
--- a/devices/src/virtio/descriptor_utils.rs
+++ b/devices/src/virtio/descriptor_utils.rs
@@ -179,7 +179,7 @@ impl<'a> Reader<'a> {
     /// Returns the number of bytes read from the descriptor chain buffer.
     /// The number of bytes read can be less than `count` if there isn't
     /// enough data in the descriptor chain buffer.
-    pub fn read_to(&mut self, dst: &AsRawFd, count: usize) -> Result<usize> {
+    pub fn read_to(&mut self, dst: &dyn AsRawFd, count: usize) -> Result<usize> {
         let mem = self.mem;
         self.buffer
             .consume(|addr, count| mem.write_from_memory(addr, dst, count), count)
@@ -269,7 +269,7 @@ impl<'a> Writer<'a> {
     /// Returns the number of bytes written to the descriptor chain buffer.
     /// The number of bytes written can be less than `count` if
     /// there isn't enough data in the descriptor chain buffer.
-    pub fn write_from(&mut self, src: &AsRawFd, count: usize) -> Result<usize> {
+    pub fn write_from(&mut self, src: &dyn AsRawFd, count: usize) -> Result<usize> {
         let mem = self.mem;
         self.buffer
             .consume(|addr, count| mem.read_to_memory(addr, src, count), count)