chore: Appease beta Clippy
This commit is contained in:
parent
3de4b4e989
commit
34295f25ff
|
@ -205,7 +205,7 @@ impl<'gc> DispatchList<'gc> {
|
|||
&mut self,
|
||||
event: impl Into<AvmString<'gc>>,
|
||||
) -> &mut BTreeMap<i32, Vec<EventHandler<'gc>>> {
|
||||
self.0.entry(event.into()).or_insert_with(BTreeMap::new)
|
||||
self.0.entry(event.into()).or_default()
|
||||
}
|
||||
|
||||
/// Get a single priority level of event handlers for a given event type,
|
||||
|
@ -217,9 +217,9 @@ impl<'gc> DispatchList<'gc> {
|
|||
) -> &mut Vec<EventHandler<'gc>> {
|
||||
self.0
|
||||
.entry(event.into())
|
||||
.or_insert_with(BTreeMap::new)
|
||||
.or_default()
|
||||
.entry(priority)
|
||||
.or_insert_with(Vec::new)
|
||||
.or_default()
|
||||
}
|
||||
|
||||
/// Add an event handler to this dispatch list.
|
||||
|
|
|
@ -421,6 +421,8 @@ impl<'gc> Library<'gc> {
|
|||
}
|
||||
|
||||
pub fn library_for_movie_mut(&mut self, movie: Arc<SwfMovie>) -> &mut MovieLibrary<'gc> {
|
||||
// NOTE(Clippy): Cannot use or_default() here as PtrWeakKeyHashMap does not have such a method on its Entry API
|
||||
#[allow(clippy::unwrap_or_default)]
|
||||
self.movie_libraries
|
||||
.entry(movie)
|
||||
.or_insert_with(MovieLibrary::new)
|
||||
|
|
|
@ -147,9 +147,9 @@ impl PixelBenderTypeExt for PixelBenderType {
|
|||
PixelBenderType::TFloat2(f1, f2) => vec![cv(f1), cv(f2)],
|
||||
PixelBenderType::TFloat3(f1, f2, f3) => vec![cv(f1), cv(f2), cv(f3)],
|
||||
PixelBenderType::TFloat4(f1, f2, f3, f4) => vec![cv(f1), cv(f2), cv(f3), cv(f4)],
|
||||
PixelBenderType::TFloat2x2(floats) => floats.iter().map(|f| cv(f)).collect(),
|
||||
PixelBenderType::TFloat3x3(floats) => floats.iter().map(|f| cv(f)).collect(),
|
||||
PixelBenderType::TFloat4x4(floats) => floats.iter().map(|f| cv(f)).collect(),
|
||||
PixelBenderType::TFloat2x2(floats) => floats.iter().map(cv).collect(),
|
||||
PixelBenderType::TFloat3x3(floats) => floats.iter().map(cv).collect(),
|
||||
PixelBenderType::TFloat4x4(floats) => floats.iter().map(cv).collect(),
|
||||
PixelBenderType::TInt2(i1, i2) => vec![(*i1).into(), (*i2).into()],
|
||||
PixelBenderType::TInt3(i1, i2, i3) => vec![(*i1).into(), (*i2).into(), (*i3).into()],
|
||||
PixelBenderType::TInt4(i1, i2, i3, i4) => {
|
||||
|
|
Loading…
Reference in New Issue