@@ -1174,14 +1174,11 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
1174
1174
///
1175
1175
/// - [`iter_many_mut`](Self::iter_many_mut) to get mutable query items.
1176
1176
#[ inline]
1177
- pub fn iter_many < ' w , ' s , EntityList : IntoIterator > (
1177
+ pub fn iter_many < ' w , ' s , EntityList : IntoIterator < Item : Borrow < Entity > > > (
1178
1178
& ' s mut self ,
1179
1179
world : & ' w World ,
1180
1180
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 > {
1185
1182
self . update_archetypes ( world) ;
1186
1183
// SAFETY: query is read only
1187
1184
unsafe {
@@ -1209,14 +1206,11 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
1209
1206
/// - [`iter_many`](Self::iter_many) to update archetypes.
1210
1207
/// - [`iter_manual`](Self::iter_manual) to iterate over all query items.
1211
1208
#[ inline]
1212
- pub fn iter_many_manual < ' w , ' s , EntityList : IntoIterator > (
1209
+ pub fn iter_many_manual < ' w , ' s , EntityList : IntoIterator < Item : Borrow < Entity > > > (
1213
1210
& ' s self ,
1214
1211
world : & ' w World ,
1215
1212
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 > {
1220
1214
self . validate_world ( world. id ( ) ) ;
1221
1215
// SAFETY: query is read only, world id is validated
1222
1216
unsafe {
@@ -1234,14 +1228,11 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
1234
1228
/// Items are returned in the order of the list of entities.
1235
1229
/// Entities that don't match the query are skipped.
1236
1230
#[ inline]
1237
- pub fn iter_many_mut < ' w , ' s , EntityList : IntoIterator > (
1231
+ pub fn iter_many_mut < ' w , ' s , EntityList : IntoIterator < Item : Borrow < Entity > > > (
1238
1232
& ' s mut self ,
1239
1233
world : & ' w mut World ,
1240
1234
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 > {
1245
1236
self . update_archetypes ( world) ;
1246
1237
let change_tick = world. change_tick ( ) ;
1247
1238
let last_change_tick = world. last_change_tick ( ) ;
@@ -1334,15 +1325,15 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
1334
1325
/// This does not validate that `world.id()` matches `self.world_id`. Calling this on a `world`
1335
1326
/// with a mismatched [`WorldId`] is unsound.
1336
1327
#[ 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 > (
1338
1329
& ' s self ,
1339
1330
entities : EntityList ,
1340
1331
world : UnsafeWorldCell < ' w > ,
1341
1332
last_run : Tick ,
1342
1333
this_run : Tick ,
1343
1334
) -> QueryManyIter < ' w , ' s , D , F , EntityList :: IntoIter >
1344
1335
where
1345
- EntityList :: Item : Borrow < Entity > ,
1336
+ EntityList : IntoIterator < Item : Borrow < Entity > > ,
1346
1337
{
1347
1338
QueryManyIter :: new ( world, self , entities, last_run, this_run)
1348
1339
}
0 commit comments