Replace map_or(true, _) with is_none_or(_) (#17073)

# Objective

Replace uses of `map_or(true, _)` with the equivalent `is_none_or(_)`.
This commit is contained in:
ickshonpe 2025-01-01 04:05:26 +00:00 committed by GitHub
parent 7302e7c9e0
commit c817864e4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1663,7 +1663,7 @@ impl World {
.storages
.resources
.get(component_id)
.map_or(true, |data| !data.is_present())
.is_none_or(|data| !data.is_present())
{
let value = R::from_world(self);
OwningPtr::make(value, |ptr| {
@ -1739,7 +1739,7 @@ impl World {
.storages
.non_send_resources
.get(component_id)
.map_or(true, |data| !data.is_present())
.is_none_or(|data| !data.is_present())
{
let value = R::from_world(self);
OwningPtr::make(value, |ptr| {
@ -2129,7 +2129,7 @@ impl World {
.storages
.resources
.get(component_id)
.map_or(true, |data| !data.is_present())
.is_none_or(|data| !data.is_present())
{
let value = R::from_world(self);
OwningPtr::make(value, |ptr| {