legion: backport upstream legion archetype filter fix
This commit is contained in:
parent
2f5f6e017a
commit
99bc2d0ea7
@ -380,9 +380,8 @@ pub struct FilterArchIter<'a, 'b, F: Filter<ArchetypeFilterData<'a>>> {
|
|||||||
|
|
||||||
impl<'a, 'b, F: Filter<ArchetypeFilterData<'a>>> Iterator for FilterArchIter<'a, 'b, F> {
|
impl<'a, 'b, F: Filter<ArchetypeFilterData<'a>>> Iterator for FilterArchIter<'a, 'b, F> {
|
||||||
type Item = ArchetypeIndex;
|
type Item = ArchetypeIndex;
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
if let Some((i, data)) = self.archetypes.next() {
|
while let Some((i, data)) = self.archetypes.next() {
|
||||||
if self.filter.is_match(&data).is_pass() {
|
if self.filter.is_match(&data).is_pass() {
|
||||||
return Some(ArchetypeIndex(i));
|
return Some(ArchetypeIndex(i));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user