From 691a61992689653b405fa43518c9b28c2a9f1ece Mon Sep 17 00:00:00 2001 From: Dylan Reid Date: Thu, 19 Dec 2019 19:52:05 -0800 Subject: [PATCH] devices: fix warning about extra parens rust 1.40 has a new warning when there are extra parens, soRemove them. Change-Id: Ibb565cac41ba8d72879f4cb8b949f2be30e55167 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1978140 Reviewed-by: Stephen Barber Tested-by: kokoro Tested-by: Dylan Reid Commit-Queue: Dylan Reid --- devices/src/usb/xhci/device_slot.rs | 2 +- x86_64/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/src/usb/xhci/device_slot.rs b/devices/src/usb/xhci/device_slot.rs index e2b5e5d06c..22cfb1d149 100644 --- a/devices/src/usb/xhci/device_slot.rs +++ b/devices/src/usb/xhci/device_slot.rs @@ -229,7 +229,7 @@ impl PortId { *self.0.lock() = 0; } - fn get(&self) -> Result<(u8)> { + fn get(&self) -> Result { let val = *self.0.lock(); if val == 0 { return Err(Error::BadPortId(val)); diff --git a/x86_64/src/lib.rs b/x86_64/src/lib.rs index bb5b675beb..a2fdf27653 100644 --- a/x86_64/src/lib.rs +++ b/x86_64/src/lib.rs @@ -631,7 +631,7 @@ impl X8664arch { exit_evt: EventFd, pci: Option>>, mem_size: u64, - ) -> Result<(devices::Bus)> { + ) -> Result { struct NoDevice; impl devices::BusDevice for NoDevice { fn debug_label(&self) -> String {