summary refs log tree commit diff
path: root/devices/src/pic.rs
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@chromium.org>2019-04-12 19:25:47 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-17 17:22:53 -0700
commit5e73d9090a823a2ec4098d824b19c45459567ba5 (patch)
tree308987bea93652e428fd725635605b415060d680 /devices/src/pic.rs
parent5fb3f5151731df314637ef82976367db2df14e66 (diff)
downloadcrosvm-5e73d9090a823a2ec4098d824b19c45459567ba5.tar
crosvm-5e73d9090a823a2ec4098d824b19c45459567ba5.tar.gz
crosvm-5e73d9090a823a2ec4098d824b19c45459567ba5.tar.bz2
crosvm-5e73d9090a823a2ec4098d824b19c45459567ba5.tar.lz
crosvm-5e73d9090a823a2ec4098d824b19c45459567ba5.tar.xz
crosvm-5e73d9090a823a2ec4098d824b19c45459567ba5.tar.zst
crosvm-5e73d9090a823a2ec4098d824b19c45459567ba5.zip
clippy: Resolve redundant_pattern_matching
TEST=bin/clippy

Change-Id: I7b8fc90ae5250e7a506b75345a66305653a095ac
Reviewed-on: https://chromium-review.googlesource.com/1566746
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'devices/src/pic.rs')
-rw-r--r--devices/src/pic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/devices/src/pic.rs b/devices/src/pic.rs
index baa98a0..33106ef 100644
--- a/devices/src/pic.rs
+++ b/devices/src/pic.rs
@@ -388,7 +388,7 @@ impl Pic {
     }
 
     fn update_irq(&mut self) -> bool {
-        if let Some(_) = self.get_irq(PicSelect::Secondary) {
+        if self.get_irq(PicSelect::Secondary).is_some() {
             // If secondary pic has an IRQ request, signal primary's cascade pin.
             Pic::set_irq_internal(
                 &mut self.pics[PicSelect::Primary as usize],
@@ -402,7 +402,7 @@ impl Pic {
             );
         }
 
-        if let Some(_) = self.get_irq(PicSelect::Primary) {
+        if self.get_irq(PicSelect::Primary).is_some() {
             // TODO(mutexlox): Signal local interrupt on APIC bus.
             // Note: this does not check if the interrupt is succesfully injected into
             // the CPU, just whether or not one is fired.