diff options
author | David Tolnay <dtolnay@chromium.org> | 2018-12-12 14:33:42 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-13 19:28:04 -0800 |
commit | 2bac1e7a9c710d6ad3e50a10463f758a1b5db40a (patch) | |
tree | fefb6ff3f38f84698b5e558f2692af15793bdde0 /devices/src/virtio/vhost | |
parent | 3397126b3c862fbd58c7fd31e90eb64c524d27ec (diff) | |
download | crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.gz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.bz2 crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.lz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.xz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.zst crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.zip |
toolchain: Update to Rust 1.31.0
We updated the production toolchain from 1.30 to 1.31 in CL:1366446. This CL does the same upgrade for the local developer toolchain and Kokoro. The relevant changes are in rust-toolchain and kokoro/Dockerfile. The rest are from rustfmt. TEST=cargo fmt --all -- --check TEST=as described in kokoro/README.md Change-Id: I3b4913f3e237baa36c664b4953be360c09efffd4 Reviewed-on: https://chromium-review.googlesource.com/1374376 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'devices/src/virtio/vhost')
-rw-r--r-- | devices/src/virtio/vhost/net.rs | 6 | ||||
-rw-r--r-- | devices/src/virtio/vhost/worker.rs | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/devices/src/virtio/vhost/net.rs b/devices/src/virtio/vhost/net.rs index 2b8c08b..4727bbc 100644 --- a/devices/src/virtio/vhost/net.rs +++ b/devices/src/virtio/vhost/net.rs @@ -58,7 +58,8 @@ where // Set offload flags to match the virtio features below. tap.set_offload( net_sys::TUN_F_CSUM | net_sys::TUN_F_UFO | net_sys::TUN_F_TSO4 | net_sys::TUN_F_TSO6, - ).map_err(Error::TapSetOffload)?; + ) + .map_err(Error::TapSetOffload)?; // We declare VIRTIO_NET_F_MRG_RXBUF, so set the vnet hdr size to match. let vnet_hdr_size = mem::size_of::<virtio_net::virtio_net_hdr_mrg_rxbuf>() as i32; @@ -237,7 +238,8 @@ pub mod tests { Ipv4Addr::new(255, 255, 255, 0), "de:21:e8:47:6b:6a".parse().unwrap(), &guest_memory, - ).unwrap() + ) + .unwrap() } #[test] diff --git a/devices/src/virtio/vhost/worker.rs b/devices/src/virtio/vhost/worker.rs index abd063b..e9ee2fb 100644 --- a/devices/src/virtio/vhost/worker.rs +++ b/devices/src/virtio/vhost/worker.rs @@ -97,7 +97,8 @@ impl<T: Vhost> Worker<T> { queue.used_ring, queue.avail_ring, None, - ).map_err(Error::VhostSetVringAddr)?; + ) + .map_err(Error::VhostSetVringAddr)?; self.vhost_handle .set_vring_base(queue_index, 0) .map_err(Error::VhostSetVringBase)?; @@ -123,7 +124,8 @@ impl<T: Vhost> Worker<T> { .and_then(|pc| { pc.add(&self.interrupt_resample_evt, Token::InterruptResample) .and(Ok(pc)) - }).and_then(|pc| pc.add(&kill_evt, Token::Kill).and(Ok(pc))) + }) + .and_then(|pc| pc.add(&kill_evt, Token::Kill).and(Ok(pc))) .map_err(Error::CreatePollContext)?; 'poll: loop { |