Panic when filtering for (tag | tag_value)
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Description
The following program causes a panic against the latest release version and the `master` branch:
```rust
use legion::prelude::*;
fn main() {
let mut world = Universe::new().create_world();
#[derive(Clone, PartialEq)] struct Tag1;
#[derive(Clone, PartialEq)] struct Tag2(u32);
#[derive(Clone, PartialEq)] struct Component;
let entity = world.insert((), std::iter::once((Component,)))[0];
world.add_tag(entity, Tag1).unwrap();
world.add_tag(entity, Tag2(123)).unwrap();
let query = Read::::query()
.filter(tag::() | tag_value(&Tag2(123)));
for _ in query.iter(&world) {}
}
```
```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/tuzz/.cargo/git/checkouts/legion-6fbc02e8da0bdce7/d51f71f/legion_core/src/filter.rs:1072:13
```
I'm trying to filter by the presence of a tag unioned with a tag_value. My understanding is that this should be supported? Thanks
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.