@@ -299,7 +299,7 @@ where
299299 /// # bevy_ecs::system::assert_is_system(report_names_system);
300300 /// ```
301301 #[ inline]
302- pub fn iter ( & ' s self ) -> QueryIter < ' w , ' s , Q , Q :: ReadOnlyFetch , F > {
302+ pub fn iter ( & self ) -> QueryIter < ' _ , ' s , Q , Q :: ReadOnlyFetch , F > {
303303 // SAFE: system runs without conflicts with other systems.
304304 // same-system queries have runtime borrow checks when they conflict
305305 unsafe {
@@ -454,17 +454,19 @@ where
454454 /// # bevy_ecs::system::assert_is_system(report_names_system);
455455 /// ```
456456 #[ inline]
457- pub fn for_each < FN : FnMut ( <Q :: ReadOnlyFetch as Fetch < ' w , ' s > >:: Item ) > ( & ' s self , f : FN ) {
457+ pub fn for_each < ' this > (
458+ & ' this self ,
459+ f : impl FnMut ( <Q :: ReadOnlyFetch as Fetch < ' this , ' s > >:: Item ) ,
460+ ) {
458461 // SAFE: system runs without conflicts with other systems.
459462 // same-system queries have runtime borrow checks when they conflict
460463 unsafe {
461- self . state
462- . for_each_unchecked_manual :: < Q :: ReadOnlyFetch , FN > (
463- self . world ,
464- f,
465- self . last_change_tick ,
466- self . change_tick ,
467- ) ;
464+ self . state . for_each_unchecked_manual :: < Q :: ReadOnlyFetch , _ > (
465+ self . world ,
466+ f,
467+ self . last_change_tick ,
468+ self . change_tick ,
469+ ) ;
468470 } ;
469471 }
470472
@@ -524,17 +526,17 @@ where
524526 ///* `batch_size` - The number of batches to spawn
525527 ///* `f` - The function to run on each item in the query
526528 #[ inline]
527- pub fn par_for_each < FN : Fn ( < Q :: ReadOnlyFetch as Fetch < ' w , ' s > > :: Item ) + Send + Sync + Clone > (
528- & ' s self ,
529+ pub fn par_for_each < ' this > (
530+ & ' this self ,
529531 task_pool : & TaskPool ,
530532 batch_size : usize ,
531- f : FN ,
533+ f : impl Fn ( < Q :: ReadOnlyFetch as Fetch < ' this , ' s > > :: Item ) + Send + Sync + Clone ,
532534 ) {
533535 // SAFE: system runs without conflicts with other systems. same-system queries have runtime
534536 // borrow checks when they conflict
535537 unsafe {
536538 self . state
537- . par_for_each_unchecked_manual :: < Q :: ReadOnlyFetch , FN > (
539+ . par_for_each_unchecked_manual :: < Q :: ReadOnlyFetch , _ > (
538540 self . world ,
539541 task_pool,
540542 batch_size,
@@ -601,9 +603,9 @@ where
601603 /// ```
602604 #[ inline]
603605 pub fn get (
604- & ' s self ,
606+ & self ,
605607 entity : Entity ,
606- ) -> Result < <Q :: ReadOnlyFetch as Fetch < ' w , ' s > >:: Item , QueryEntityError > {
608+ ) -> Result < <Q :: ReadOnlyFetch as Fetch < ' _ , ' s > >:: Item , QueryEntityError > {
607609 // SAFE: system runs without conflicts with other systems.
608610 // same-system queries have runtime borrow checks when they conflict
609611 unsafe {
@@ -834,7 +836,7 @@ where
834836 /// Panics if the number of query results is not exactly one. Use
835837 /// [`get_single`](Self::get_single) to return a `Result` instead of panicking.
836838 #[ track_caller]
837- pub fn single ( & ' s self ) -> <Q :: ReadOnlyFetch as Fetch < ' w , ' s > >:: Item {
839+ pub fn single ( & self ) -> <Q :: ReadOnlyFetch as Fetch < ' _ , ' s > >:: Item {
838840 self . get_single ( ) . unwrap ( )
839841 }
840842
@@ -870,8 +872,8 @@ where
870872 /// # bevy_ecs::system::assert_is_system(player_scoring_system);
871873 /// ```
872874 pub fn get_single (
873- & ' s self ,
874- ) -> Result < <Q :: ReadOnlyFetch as Fetch < ' w , ' s > >:: Item , QuerySingleError > {
875+ & self ,
876+ ) -> Result < <Q :: ReadOnlyFetch as Fetch < ' _ , ' s > >:: Item , QuerySingleError > {
875877 let mut query = self . iter ( ) ;
876878 let first = query. next ( ) ;
877879 let extra = query. next ( ) . is_some ( ) ;
0 commit comments