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>
This commit is contained in:
David Tolnay 2019-04-12 19:25:47 -07:00 committed by chrome-bot
parent 5fb3f51517
commit 5e73d9090a
2 changed files with 2 additions and 3 deletions

View file

@ -16,7 +16,6 @@ SUPPRESS=(
let_unit_value
question_mark
range_plus_one
redundant_pattern_matching
single_match
string_lit_as_bytes
toplevel_ref_arg

View file

@ -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.