Silence Clippy warnings

This commit is contained in:
Hanno Braun 2023-10-06 17:45:28 +02:00
parent 45b6bb4e7c
commit 5ad27562ba

View File

@ -100,6 +100,9 @@ pub struct TransformCache(TypeMap);
impl TransformCache {
fn get<T: 'static>(&mut self, key: &Handle<T>) -> Option<&Handle<T>> {
// Silencing Clippy warning due to false positive in Rust 1.73.0. See:
// https://github.com/rust-lang/rust-clippy/issues/11390#issuecomment-1750951533
#[allow(clippy::unwrap_or_default)]
let map = self
.0
.entry::<BTreeMap<ObjectId, Handle<T>>>()
@ -109,6 +112,9 @@ impl TransformCache {
}
fn insert<T: 'static>(&mut self, key: Handle<T>, value: Handle<T>) {
// Silencing Clippy warning due to false positive in Rust 1.73.0. See:
// https://github.com/rust-lang/rust-clippy/issues/11390#issuecomment-1750951533
#[allow(clippy::unwrap_or_default)]
let map = self
.0
.entry::<BTreeMap<ObjectId, Handle<T>>>()