legion: backport upstream legion archetype filter fix

This commit is contained in:
Carter Anderson 2020-06-23 13:42:00 -07:00
parent 2f5f6e017a
commit 99bc2d0ea7

View file

@ -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> {
type Item = ArchetypeIndex;
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() {
return Some(ArchetypeIndex(i));
}