Skip to content

Commit 1648e06

Browse files
committed
Review items
1 parent 4936e49 commit 1648e06

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/bevy_ecs/src/reflect.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ pub struct ReflectComponentFns {
5353
/// Function pointer implementing [`ReflectComponent::remove()`].
5454
pub remove: fn(&mut EntityMut),
5555
/// Function pointer implementing [`ReflectComponent::contains()`].
56-
pub contains: fn(&EntityRef) -> bool,
56+
pub contains: fn(EntityRef) -> bool,
5757
/// Function pointer implementing [`ReflectComponent::reflect()`].
58-
pub reflect: for<'a> fn(&'a EntityRef) -> Option<&'a dyn Reflect>,
58+
pub reflect: fn(EntityRef) -> Option<&dyn Reflect>,
5959
/// Function pointer implementing [`ReflectComponent::reflect_mut()`].
6060
pub reflect_mut: for<'a> fn(&'a mut EntityMut) -> Option<Mut<'a, dyn Reflect>>,
6161
/// Function pointer implementing [`ReflectComponent::reflect_unchecked_mut()`].
@@ -117,12 +117,12 @@ impl ReflectComponent {
117117
}
118118

119119
/// Returns whether entity contains this [`Component`]
120-
pub fn contains(&self, entity: &EntityRef) -> bool {
120+
pub fn contains(&self, entity: EntityRef) -> bool {
121121
(self.0.contains)(entity)
122122
}
123123

124124
/// Gets the value of this [`Component`] type from the entity as a reflected reference.
125-
pub fn reflect<'a>(&self, entity: &'a EntityRef<'a>) -> Option<&'a dyn Reflect> {
125+
pub fn reflect<'a>(&self, entity: EntityRef<'a>) -> Option<&'a dyn Reflect> {
126126
(self.0.reflect)(entity)
127127
}
128128

crates/bevy_scene/src/dynamic_scene_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<'w> DynamicSceneBuilder<'w> {
132132
.get_info(component_id)
133133
.and_then(|info| type_registry.get(info.type_id().unwrap()))
134134
.and_then(|registration| registration.data::<ReflectComponent>())
135-
.and_then(|reflect_component| reflect_component.reflect(&entity));
135+
.and_then(|reflect_component| reflect_component.reflect(entity));
136136

137137
if let Some(reflect_component) = reflect_component {
138138
entry.components.push(reflect_component.clone_value());

0 commit comments

Comments
 (0)