Skip to content

Commit 39637ac

Browse files
clippy: Fix needless_bool warnings.
1 parent 83c29f5 commit 39637ac

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/lib.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,18 +1671,12 @@ impl Build {
16711671
// CFLAGS/CXXFLAGS, since those variables presumably already contain
16721672
// the desired set of warnings flags.
16731673

1674-
if self
1675-
.warnings
1676-
.unwrap_or(if self.has_flags() { false } else { true })
1677-
{
1674+
if self.warnings.unwrap_or(!self.has_flags()) {
16781675
let wflags = cmd.family.warnings_flags().into();
16791676
cmd.push_cc_arg(wflags);
16801677
}
16811678

1682-
if self
1683-
.extra_warnings
1684-
.unwrap_or(if self.has_flags() { false } else { true })
1685-
{
1679+
if self.extra_warnings.unwrap_or(!self.has_flags()) {
16861680
if let Some(wflags) = cmd.family.extra_warnings_flags() {
16871681
cmd.push_cc_arg(wflags.into());
16881682
}

0 commit comments

Comments
 (0)