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:
parent
7302e7c9e0
commit
c817864e4f
@ -1663,7 +1663,7 @@ impl World {
|
|||||||
.storages
|
.storages
|
||||||
.resources
|
.resources
|
||||||
.get(component_id)
|
.get(component_id)
|
||||||
.map_or(true, |data| !data.is_present())
|
.is_none_or(|data| !data.is_present())
|
||||||
{
|
{
|
||||||
let value = R::from_world(self);
|
let value = R::from_world(self);
|
||||||
OwningPtr::make(value, |ptr| {
|
OwningPtr::make(value, |ptr| {
|
||||||
@ -1739,7 +1739,7 @@ impl World {
|
|||||||
.storages
|
.storages
|
||||||
.non_send_resources
|
.non_send_resources
|
||||||
.get(component_id)
|
.get(component_id)
|
||||||
.map_or(true, |data| !data.is_present())
|
.is_none_or(|data| !data.is_present())
|
||||||
{
|
{
|
||||||
let value = R::from_world(self);
|
let value = R::from_world(self);
|
||||||
OwningPtr::make(value, |ptr| {
|
OwningPtr::make(value, |ptr| {
|
||||||
@ -2129,7 +2129,7 @@ impl World {
|
|||||||
.storages
|
.storages
|
||||||
.resources
|
.resources
|
||||||
.get(component_id)
|
.get(component_id)
|
||||||
.map_or(true, |data| !data.is_present())
|
.is_none_or(|data| !data.is_present())
|
||||||
{
|
{
|
||||||
let value = R::from_world(self);
|
let value = R::from_world(self);
|
||||||
OwningPtr::make(value, |ptr| {
|
OwningPtr::make(value, |ptr| {
|
||||||
|
Loading…
Reference in New Issue
Block a user