Skip to content

Commit 86e6648

Browse files
committed
fix impls
1 parent ae70f88 commit 86e6648

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

crates/bevy_render/src/sync_world.rs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ mod render_entities_world_query_impls {
282282
component::{ComponentId, Components},
283283
entity::Entity,
284284
query::{
285-
ArchetypeQueryData, FilteredAccess, QueryData, ReadOnlyQueryData,
285+
ArchetypeQueryData, FilteredAccess, QueryData, ReadOnlyQueryData, ReborrowQueryData,
286286
ReleaseStateQueryData, WorldQuery,
287287
},
288288
storage::{Table, TableRow},
@@ -373,12 +373,6 @@ mod render_entities_world_query_impls {
373373
item
374374
}
375375

376-
fn reborrow<'wlong: 'short, 'slong: 'short, 'short>(
377-
item: &'short mut Self::Item<'wlong, 'slong>,
378-
) -> Self::Item<'short, 'short> {
379-
*item
380-
}
381-
382376
#[inline(always)]
383377
unsafe fn fetch<'w, 's>(
384378
state: &'s Self::State,
@@ -396,6 +390,14 @@ mod render_entities_world_query_impls {
396390
// SAFETY: the underlying `Entity` is copied, and no mutable access is provided.
397391
unsafe impl ReadOnlyQueryData for RenderEntity {}
398392

393+
impl ReborrowQueryData for RenderEntity {
394+
fn reborrow<'wlong: 'short, 'slong: 'short, 'short>(
395+
item: &'short mut Self::Item<'wlong, 'slong>,
396+
) -> Self::Item<'short, 'short> {
397+
*item
398+
}
399+
}
400+
399401
impl ArchetypeQueryData for RenderEntity {}
400402

401403
impl ReleaseStateQueryData for RenderEntity {
@@ -488,12 +490,6 @@ mod render_entities_world_query_impls {
488490
item
489491
}
490492

491-
fn reborrow<'wlong: 'short, 'slong: 'short, 'short>(
492-
item: &'short mut Self::Item<'wlong, 'slong>,
493-
) -> Self::Item<'short, 'short> {
494-
*item
495-
}
496-
497493
#[inline(always)]
498494
unsafe fn fetch<'w, 's>(
499495
state: &'s Self::State,
@@ -511,6 +507,14 @@ mod render_entities_world_query_impls {
511507
// SAFETY: the underlying `Entity` is copied, and no mutable access is provided.
512508
unsafe impl ReadOnlyQueryData for MainEntity {}
513509

510+
impl ReborrowQueryData for MainEntity {
511+
fn reborrow<'wlong: 'short, 'slong: 'short, 'short>(
512+
item: &'short mut Self::Item<'wlong, 'slong>,
513+
) -> Self::Item<'short, 'short> {
514+
*item
515+
}
516+
}
517+
514518
impl ArchetypeQueryData for MainEntity {}
515519

516520
impl ReleaseStateQueryData for MainEntity {

0 commit comments

Comments
 (0)