mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-10-25 21:39:48 +00:00
clippy: Resolve if_same_then_else
Suppressing the lint locally because by the author's and reviewers' judgement this was the clearest way to write this code. The lint is still valuable for catching mistakes in copied and pasted code elsewhere. TEST=bin/clippy Change-Id: I77477fce51571220fd6259072519b31764a15aeb Reviewed-on: https://chromium-review.googlesource.com/1566737 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:
parent
e246836798
commit
afb1401500
3 changed files with 2 additions and 1 deletions
|
@ -39,7 +39,6 @@ SUPPRESS=(
|
|||
|
||||
# To be resolved or suppressed locally.
|
||||
cast_ptr_alignment
|
||||
if_same_then_else
|
||||
ptr_arg
|
||||
|
||||
# We don't care about these lints. Okay to remain suppressed globally.
|
||||
|
|
|
@ -111,6 +111,7 @@ impl<'a> DescriptorChain<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::if_same_then_else)]
|
||||
fn is_valid(&self) -> bool {
|
||||
if self
|
||||
.mem
|
||||
|
|
|
@ -165,6 +165,7 @@ pub trait Vhost: AsRawFd + std::marker::Sized {
|
|||
}
|
||||
|
||||
// TODO(smbarber): This is copypasta. Eliminate the copypasta.
|
||||
#[allow(clippy::if_same_then_else)]
|
||||
fn is_valid(
|
||||
&self,
|
||||
queue_max_size: u16,
|
||||
|
|
Loading…
Reference in a new issue