@@ -1174,14 +1174,11 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
11741174 ///
11751175 /// - [`iter_many_mut`](Self::iter_many_mut) to get mutable query items.
11761176 #[ inline]
1177- pub fn iter_many < ' w , ' s , EntityList : IntoIterator > (
1177+ pub fn iter_many < ' w , ' s , EntityList : IntoIterator < Item : Borrow < Entity > > > (
11781178 & ' s mut self ,
11791179 world : & ' w World ,
11801180 entities : EntityList ,
1181- ) -> QueryManyIter < ' w , ' s , D :: ReadOnly , F , EntityList :: IntoIter >
1182- where
1183- EntityList :: Item : Borrow < Entity > ,
1184- {
1181+ ) -> QueryManyIter < ' w , ' s , D :: ReadOnly , F , EntityList :: IntoIter > {
11851182 self . update_archetypes ( world) ;
11861183 // SAFETY: query is read only
11871184 unsafe {
@@ -1209,14 +1206,11 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
12091206 /// - [`iter_many`](Self::iter_many) to update archetypes.
12101207 /// - [`iter_manual`](Self::iter_manual) to iterate over all query items.
12111208 #[ inline]
1212- pub fn iter_many_manual < ' w , ' s , EntityList : IntoIterator > (
1209+ pub fn iter_many_manual < ' w , ' s , EntityList : IntoIterator < Item : Borrow < Entity > > > (
12131210 & ' s self ,
12141211 world : & ' w World ,
12151212 entities : EntityList ,
1216- ) -> QueryManyIter < ' w , ' s , D :: ReadOnly , F , EntityList :: IntoIter >
1217- where
1218- EntityList :: Item : Borrow < Entity > ,
1219- {
1213+ ) -> QueryManyIter < ' w , ' s , D :: ReadOnly , F , EntityList :: IntoIter > {
12201214 self . validate_world ( world. id ( ) ) ;
12211215 // SAFETY: query is read only, world id is validated
12221216 unsafe {
@@ -1234,14 +1228,11 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
12341228 /// Items are returned in the order of the list of entities.
12351229 /// Entities that don't match the query are skipped.
12361230 #[ inline]
1237- pub fn iter_many_mut < ' w , ' s , EntityList : IntoIterator > (
1231+ pub fn iter_many_mut < ' w , ' s , EntityList : IntoIterator < Item : Borrow < Entity > > > (
12381232 & ' s mut self ,
12391233 world : & ' w mut World ,
12401234 entities : EntityList ,
1241- ) -> QueryManyIter < ' w , ' s , D , F , EntityList :: IntoIter >
1242- where
1243- EntityList :: Item : Borrow < Entity > ,
1244- {
1235+ ) -> QueryManyIter < ' w , ' s , D , F , EntityList :: IntoIter > {
12451236 self . update_archetypes ( world) ;
12461237 let change_tick = world. change_tick ( ) ;
12471238 let last_change_tick = world. last_change_tick ( ) ;
@@ -1334,15 +1325,15 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
13341325 /// This does not validate that `world.id()` matches `self.world_id`. Calling this on a `world`
13351326 /// with a mismatched [`WorldId`] is unsound.
13361327 #[ inline]
1337- pub ( crate ) unsafe fn iter_many_unchecked_manual < ' w , ' s , EntityList : IntoIterator > (
1328+ pub ( crate ) unsafe fn iter_many_unchecked_manual < ' w , ' s , EntityList > (
13381329 & ' s self ,
13391330 entities : EntityList ,
13401331 world : UnsafeWorldCell < ' w > ,
13411332 last_run : Tick ,
13421333 this_run : Tick ,
13431334 ) -> QueryManyIter < ' w , ' s , D , F , EntityList :: IntoIter >
13441335 where
1345- EntityList :: Item : Borrow < Entity > ,
1336+ EntityList : IntoIterator < Item : Borrow < Entity > > ,
13461337 {
13471338 QueryManyIter :: new ( world, self , entities, last_run, this_run)
13481339 }
0 commit comments