Ralith / hecs

A handy ECS
Apache License 2.0
967 stars 82 forks source link

Don't clutter caller namespace with derive(Query) internals #326

Closed Ralith closed 1 year ago

Ralith commented 1 year ago

Rather than giving the Fetch/State types names unlikely to collide, we can introduce fully hygenic names by moving the type definitions and the trait impls that depend on them into an anonymous scope.

This was intended as groundwork for making derive(Query) work for queries where Query::Item and Self structurally differ (like Without) but that makes it impossible to derive attributes for the query item, which seems suboptimal. Still, useful cleanup.