Anders429 / brood

A fast and flexible entity component system library.
Apache License 2.0
39 stars 1 forks source link

Allow `Entry` access from system run method. #195

Closed Anders429 closed 1 year ago

Anders429 commented 1 year ago

Fixes #191.

This fix is basically what I described in the issue. By changing the query::Entry bounds to no longer require SubViews and Filter to be contained directly in the Registry, we are able to define proper trait bounds on System::run() (and ParSystem::run()) to allow the access for any generic Registry.

codecov[bot] commented 1 year ago

Codecov Report

Merging #195 (ff6295a) into dev (d446c75) will increase coverage by 0.13%. The diff coverage is 98.28%.

@@            Coverage Diff             @@
##              dev     #195      +/-   ##
==========================================
+ Coverage   94.72%   94.85%   +0.13%     
==========================================
  Files          88       89       +1     
  Lines       14186    15477    +1291     
==========================================
+ Hits        13437    14681    +1244     
- Misses        749      796      +47     
Impacted Files Coverage Δ
src/system/schedule/scheduler.rs 100.00% <ø> (ø)
src/system/schedule/sealed.rs 100.00% <ø> (ø)
src/system/schedule/stager.rs 100.00% <ø> (ø)
src/system/schedule/stages.rs 100.00% <ø> (ø)
src/system/schedule/task/sealed.rs 100.00% <ø> (ø)
src/system/schedule/mod.rs 75.74% <76.78%> (-0.37%) :arrow_down:
src/archetype/mod.rs 98.07% <100.00%> (+0.11%) :arrow_up:
src/query/entries.rs 100.00% <100.00%> (ø)
src/query/view/contains/filter.rs 100.00% <100.00%> (ø)
src/query/view/get.rs 95.60% <100.00%> (-4.40%) :arrow_down:
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.