-
Notifications
You must be signed in to change notification settings - Fork 17
Code reorganization to facilitate planned Added/Changed
extensions
#29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added/Changed
extension`Added/Changed
extensions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are way too small. I don't see much benefit in separating multiple_read
and multiple_write
from all
-- same with singular_*
and one
.
@JoJoJet ah, What I can do is keep this PR open, and work on the added/changed stuff. Once that PR is up, you'll have more information as to how things ought to be organized? |
Okay, because it seemed that I can keep the But can have you a look at how multiple_read and multiple_write change here, and then decide whether they should still be collapsed: #30 |
I will leave the decision up to you, but IMO it's fine to just merge those files. |
//! Trait queries support basic change detection filtration. So to get all the components that | ||
//! implement the target trait, and have also changed in some way since the last tick, you can: | ||
//! ```ignore | ||
//! fn show_tooltips( | ||
//! tooltips: Query<ChangedAll<&dyn Tooltip>> | ||
//! // ... | ||
//! ) { | ||
//! for tooltip in &tooltips { | ||
//! println!("changed tool tips: {}", tooltip.tooltip()); | ||
//! } | ||
//! } | ||
//! ``` | ||
//! | ||
//! Similarly, there exist `ChangedOne`, `AddedOne`, and `AddedAll`. | ||
//! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this belongs here?
Co-authored-by: JoJoJet <[email protected]>
So, apparently cargo-rdme doesn't like re-exports, so that doc link on line 167 of lib.rs needs to be |
Github won't let me push to this branch, so I'm just going to go ahead and merge this, then apply my nitpicks in a follow-up PR. |
Fixes some nitpicks introduced by #29.
lib.rs
is becoming quite unwieldy with the new extensions planned toAdded/Changed
: for instance, there will be newWorldQuery
adapters,ReadTraits
iterators, and newWriteTraits
iterators. In order to make the file easier to navigate, and thereby mitigate the risk of errors, I think it will be useful to reorganize the code