diff options
author | David Tolnay <dtolnay@chromium.org> | 2019-03-12 20:52:34 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-08 22:30:35 -0700 |
commit | ce48c2b98676dd459fbae0fab88d8beb4b07d8b2 (patch) | |
tree | dab9b2d37e1d6b319f93394c234c992e7d725d0d /sys_util | |
parent | 939997566d931042580f6ac173747059d222604b (diff) | |
download | crosvm-ce48c2b98676dd459fbae0fab88d8beb4b07d8b2.tar crosvm-ce48c2b98676dd459fbae0fab88d8beb4b07d8b2.tar.gz crosvm-ce48c2b98676dd459fbae0fab88d8beb4b07d8b2.tar.bz2 crosvm-ce48c2b98676dd459fbae0fab88d8beb4b07d8b2.tar.lz crosvm-ce48c2b98676dd459fbae0fab88d8beb4b07d8b2.tar.xz crosvm-ce48c2b98676dd459fbae0fab88d8beb4b07d8b2.tar.zst crosvm-ce48c2b98676dd459fbae0fab88d8beb4b07d8b2.zip |
edition: Update sys_util 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: Ic57170776a9396bab54a8c7eb2b8b1436f63b57c Reviewed-on: https://chromium-review.googlesource.com/1520069 Commit-Ready: David Tolnay <dtolnay@chromium.org> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: David Tolnay <dtolnay@chromium.org>
Diffstat (limited to 'sys_util')
-rw-r--r-- | sys_util/Cargo.toml | 1 | ||||
-rw-r--r-- | sys_util/poll_token_derive/Cargo.toml | 1 | ||||
-rw-r--r-- | sys_util/src/capabilities.rs | 3 | ||||
-rw-r--r-- | sys_util/src/guest_memory.rs | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/sys_util/Cargo.toml b/sys_util/Cargo.toml index 5dd67f2..e9fcfd7 100644 --- a/sys_util/Cargo.toml +++ b/sys_util/Cargo.toml @@ -2,6 +2,7 @@ name = "sys_util" version = "0.1.0" authors = ["The Chromium OS Authors"] +edition = "2018" include = ["src/**/*", "Cargo.toml"] [dependencies] diff --git a/sys_util/poll_token_derive/Cargo.toml b/sys_util/poll_token_derive/Cargo.toml index 4ec0c53..e29191f 100644 --- a/sys_util/poll_token_derive/Cargo.toml +++ b/sys_util/poll_token_derive/Cargo.toml @@ -2,6 +2,7 @@ name = "poll_token_derive" version = "0.1.0" authors = ["The Chromium OS Authors"] +edition = "2018" include = ["*.rs", "Cargo.toml"] [lib] diff --git a/sys_util/src/capabilities.rs b/sys_util/src/capabilities.rs index 0117ce4..5f42ab8 100644 --- a/sys_util/src/capabilities.rs +++ b/sys_util/src/capabilities.rs @@ -5,7 +5,8 @@ extern crate libc; use libc::{c_int, c_void}; -use {errno_result, Result}; + +use crate::{errno_result, Result}; #[allow(non_camel_case_types)] type cap_t = *mut c_void; diff --git a/sys_util/src/guest_memory.rs b/sys_util/src/guest_memory.rs index 0d0c292..6586e6b 100644 --- a/sys_util/src/guest_memory.rs +++ b/sys_util/src/guest_memory.rs @@ -342,7 +342,7 @@ impl GuestMemory { /// Ok(()) /// # } /// ``` - pub fn read_at_addr(&self, mut buf: &mut [u8], guest_addr: GuestAddress) -> Result<usize> { + pub fn read_at_addr(&self, buf: &mut [u8], guest_addr: GuestAddress) -> Result<usize> { self.do_in_region(guest_addr, move |mapping, offset| { mapping .read_slice(buf, offset) |