-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Let query items borrow from query state to avoid needing to clone #15396
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
e99a0c1
Don't obtain two NameOrEntity items at once from QueryState::get().
chescock f295624
Introduce a ReleaseStateQueryData trait that will release borrows on …
chescock 648eb31
Add a 'state lifetime to query items and fetches.
chescock b870249
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock f6f4259
Fix merge conflicts with traversal changes.
chescock be7a1de
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock 0872293
Link to update_archetypes() and corresponding _manual() methods where…
chescock 70ced02
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock d1fbada
Fix merge conflicts with QuerySingle.
chescock 22eee9e
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock 174af45
Fix new uses of Item<'w>.
chescock 18520ef
Merge commit '6be11a8a42c2c73646cc994392bbd628b6de523b' into state-in…
chescock a080cb0
Fix build.
chescock ac313fd
Update AssetChanged.
chescock 9a74906
impl ReleaseStateQueryData for Traversal types.
chescock 6188a86
Add `expect` and `reason` for `allow(clippy::unused_unit)` in tuple i…
chescock 9871970
Merge commit '03af547c2898cb905b3917725b13081e48654b15' into state-in…
chescock 371ca14
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock 5dce18f
Restore changes lost by bad merging.
chescock d63f936
impl ReleaseStateQueryData for Option, MainEntity, and RenderEntity.
chescock 7ad98aa
Implement ReleaseStateQueryData for derived QueryData.
chescock e89a909
Use `collect()` in `QueryIter::sort()`.
chescock df2fcce
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock f7c3b27
Update new uses of `QueryItem` to include `'s` lifetime.
chescock 4e60256
Document that most QueryData types impl ReleaseStateQueryData.
chescock 42d5aa3
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock a748abe
Add `'s` lifetime to new uses of QueryItem.
chescock 99c4bc2
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock 3beeedb
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock 7e90d6d
Move migration guide into repository.
chescock 59a2d1d
Merge remote-tracking branch 'remotes/origin/main' into state-in-quer…
chescock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Afaik blanket impls like this tend to give unhelpful errors when they go unfulfilled. In the future maybe we should add a
#[query_data(release_state)]
and remove the per-field bounds, so any errors happen at the macro call site instead of at use sites?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.
Oh, I hadn't considered what the errors would look like! I'd still lean towards implementing this automatically for now, though. Very few APIs actually require it, so I'd expect it to be forgotten if it isn't automatic, but most
QueryData
will implement it successfully.