chore: Fix Clippy lints and allow `clippy::bool_to_int_with_if`

In several cases, the current code seems preferable to the
code required by `clippy::bool_to_int_with_if`. Let's suppress
this for now to get the build passing, and decide later if this
is something that we want to enable.
This commit is contained in:
Aaron Hill 2022-09-11 02:49:53 -05:00 committed by Adrian Wielgosik
parent 92044c9c02
commit 1d6b3b6f57
4 changed files with 7 additions and 6 deletions

View File

@ -48,12 +48,7 @@ impl<'gc> SharedObject<'gc> {
}
pub fn get_name(&self) -> String {
self.0
.read()
.name
.as_ref()
.cloned()
.unwrap_or_else(|| "".to_string())
self.0.read().name.as_ref().cloned().unwrap_or_default()
}
}

View File

@ -1,3 +1,5 @@
#![allow(clippy::bool_to_int_with_if)]
#[macro_use]
mod display_object;
pub use display_object::StageDisplayState;

View File

@ -1,3 +1,5 @@
#![allow(clippy::bool_to_int_with_if)]
use bytemuck::{Pod, Zeroable};
use fnv::FnvHashMap;
use ruffle_render::backend::null::NullBitmapSource;

View File

@ -7,6 +7,8 @@
//! This library consists of a `read` module for decoding SWF data, and a `write` library for
//! writing SWF data.
#![allow(clippy::bool_to_int_with_if)]
#[cfg(feature = "flate2")]
extern crate flate2;
#[cfg(feature = "libflate")]