summary refs log tree commit diff
path: root/kvm
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2018-10-30 09:24:51 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-31 12:42:26 -0700
commiteeebe63c43482ee6a52b9ff480724f2ae60db821 (patch)
treea148ae13bca616aab84bcefd8e4be727b9adb7af /kvm
parentf28a864fd9dc5adaec0c65f4737560556861859d (diff)
downloadcrosvm-eeebe63c43482ee6a52b9ff480724f2ae60db821.tar
crosvm-eeebe63c43482ee6a52b9ff480724f2ae60db821.tar.gz
crosvm-eeebe63c43482ee6a52b9ff480724f2ae60db821.tar.bz2
crosvm-eeebe63c43482ee6a52b9ff480724f2ae60db821.tar.lz
crosvm-eeebe63c43482ee6a52b9ff480724f2ae60db821.tar.xz
crosvm-eeebe63c43482ee6a52b9ff480724f2ae60db821.tar.zst
crosvm-eeebe63c43482ee6a52b9ff480724f2ae60db821.zip
cargo fmt with Rust 1.30.0
Rust 1.30.0 ships a new rustfmt that causes a few more formatting
changes.

BUG=None
TEST=Run kokoro tests with updated Rust version

Change-Id: I803765ec0f3d2447f627b1e990bce438512367f7
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1307816
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'kvm')
-rw-r--r--kvm/src/lib.rs70
1 files changed, 30 insertions, 40 deletions
diff --git a/kvm/src/lib.rs b/kvm/src/lib.rs
index f9188e0..050e1cd 100644
--- a/kvm/src/lib.rs
+++ b/kvm/src/lib.rs
@@ -487,14 +487,12 @@ impl Vm {
     /// Crates an in kernel interrupt controller.
     ///
     /// See the documentation on the KVM_CREATE_IRQCHIP ioctl.
-    #[cfg(
-        any(
-            target_arch = "x86",
-            target_arch = "x86_64",
-            target_arch = "arm",
-            target_arch = "aarch64"
-        )
-    )]
+    #[cfg(any(
+        target_arch = "x86",
+        target_arch = "x86_64",
+        target_arch = "arm",
+        target_arch = "aarch64"
+    ))]
     pub fn create_irq_chip(&self) -> Result<()> {
         // Safe because we know that our file is a VM fd and we verify the return result.
         let ret = unsafe { ioctl(self, KVM_CREATE_IRQCHIP()) };
@@ -588,14 +586,12 @@ impl Vm {
     }
 
     /// Sets the level on the given irq to 1 if `active` is true, and 0 otherwise.
-    #[cfg(
-        any(
-            target_arch = "x86",
-            target_arch = "x86_64",
-            target_arch = "arm",
-            target_arch = "aarch64"
-        )
-    )]
+    #[cfg(any(
+        target_arch = "x86",
+        target_arch = "x86_64",
+        target_arch = "arm",
+        target_arch = "aarch64"
+    ))]
     pub fn set_irq_line(&self, irq: u32, active: bool) -> Result<()> {
         let mut irq_level = kvm_irq_level::default();
         irq_level.__bindgen_anon_1.irq = irq;
@@ -747,14 +743,12 @@ impl Vm {
     }
 
     /// Registers an event that will, when signalled, trigger the `gsi` irq.
-    #[cfg(
-        any(
-            target_arch = "x86",
-            target_arch = "x86_64",
-            target_arch = "arm",
-            target_arch = "aarch64"
-        )
-    )]
+    #[cfg(any(
+        target_arch = "x86",
+        target_arch = "x86_64",
+        target_arch = "arm",
+        target_arch = "aarch64"
+    ))]
     pub fn register_irqfd(&self, evt: &EventFd, gsi: u32) -> Result<()> {
         let irqfd = kvm_irqfd {
             fd: evt.as_raw_fd() as u32,
@@ -773,14 +767,12 @@ impl Vm {
 
     /// Registers an event that will, when signalled, trigger the `gsi` irq, and `resample_evt` will
     /// get triggered when the irqchip is resampled.
-    #[cfg(
-        any(
-            target_arch = "x86",
-            target_arch = "x86_64",
-            target_arch = "arm",
-            target_arch = "aarch64"
-        )
-    )]
+    #[cfg(any(
+        target_arch = "x86",
+        target_arch = "x86_64",
+        target_arch = "arm",
+        target_arch = "aarch64"
+    ))]
     pub fn register_irqfd_resample(
         &self,
         evt: &EventFd,
@@ -809,14 +801,12 @@ impl Vm {
     ///
     /// The `evt` and `gsi` pair must be the same as the ones passed into
     /// `register_irqfd`/`register_irqfd_resample`.
-    #[cfg(
-        any(
-            target_arch = "x86",
-            target_arch = "x86_64",
-            target_arch = "arm",
-            target_arch = "aarch64"
-        )
-    )]
+    #[cfg(any(
+        target_arch = "x86",
+        target_arch = "x86_64",
+        target_arch = "arm",
+        target_arch = "aarch64"
+    ))]
     pub fn unregister_irqfd(&self, evt: &EventFd, gsi: u32) -> Result<()> {
         let irqfd = kvm_irqfd {
             fd: evt.as_raw_fd() as u32,