Skip to content

Commit

Permalink
clippy: Fix needless_bool warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Oct 2, 2023
1 parent 83c29f5 commit 39637ac
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1671,18 +1671,12 @@ impl Build {
// CFLAGS/CXXFLAGS, since those variables presumably already contain
// the desired set of warnings flags.

if self
.warnings
.unwrap_or(if self.has_flags() { false } else { true })
{
if self.warnings.unwrap_or(!self.has_flags()) {
let wflags = cmd.family.warnings_flags().into();
cmd.push_cc_arg(wflags);
}

if self
.extra_warnings
.unwrap_or(if self.has_flags() { false } else { true })
{
if self.extra_warnings.unwrap_or(!self.has_flags()) {
if let Some(wflags) = cmd.family.extra_warnings_flags() {
cmd.push_cc_arg(wflags.into());
}
Expand Down

0 comments on commit 39637ac

Please sign in to comment.