Rename all-query functions.#153940
Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom Mar 16, 2026
Merged
Conversation
Collaborator
|
|
Zalathar
reviewed
Mar 16, 2026
There are four functions that use `for_each_query_vtable!` to call an "inner"
function. They are:
- collect_active_jobs_from_all_queries -> gather_active_jobs
- alloc_self_profile_query_strings -> alloc_self_profile_query_strings_for_query_cache
- encode_all_query_results -> encode_query_results
- query_key_hash_verify_all -> query_key_hash_verify
These names are all over the place. This commit renames them as follows:
- collect_active_query_jobs{,_inner}
- alloc_self_profile_query_strings{,_inner}
- encode_query_values{,_inner}
- verify_query_key_hashes{,_inner}
This:
- puts the verb at the start
- uses "inner" for all the inners (which makes sense now that the inners are
all next to their callers)
- uses `_query_` consistently
- avoids `all`, because the plurals are enough
- uses `values` instead of `results`
- removes the `collect`/`gather` distinction, which is no longer
important
It should have been removed in rust-lang#153650. (The comments on `CollectActiveJobsKind` suffice now.)
d2eacf6 to
a8024fc
Compare
Collaborator
|
Contributor
Author
|
I updated to address the comments. I also added a second commit removing an out-of-date comment. |
Member
|
Looks good, r=me when PR CI is green. |
Member
|
@bors r+ rollup |
Contributor
Contributor
|
⌛ Testing commit a8024fc with merge 45263da... Workflow: https://github.com/rust-lang/rust/actions/runs/23132264375 |
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 16, 2026
Rename all-query functions.
There are four functions that use `for_each_query_vtable!` to call an "inner" function. They are:
- `collect_active_jobs_from_all_queries` -> `gather_active_jobs`
- `alloc_self_profile_query_strings` -> `alloc_self_profile_query_strings_for_query_cache`
- `encode_all_query_results` -> `encode_query_results`
- `query_key_hash_verify_all` -> `query_key_hash_verify`
These names are all over the place. This commit renames them as follows:
- `collect_active_query_jobs{,_inner}`
- `alloc_self_profile_query_strings{,_inner}`
- `encode_query_values{,_inner}`
- `verify_query_key_hashes{,_inner}`
This:
- puts the verb at the start
- uses `_inner` for all the inners (which makes sense now that the inners are all next to their callers)
- uses `_query_` consistently
- avoids `all`, because the plurals are enough
- uses `values` instead of `results`
- removes the `collect`/`gather` distinction, which is no longer important
r? @Zalathar
Member
|
@bors yield (enclosing rollup) |
Contributor
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #153944. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 are four functions that use
for_each_query_vtable!to call an "inner" function. They are:collect_active_jobs_from_all_queries->gather_active_jobsalloc_self_profile_query_strings->alloc_self_profile_query_strings_for_query_cacheencode_all_query_results->encode_query_resultsquery_key_hash_verify_all->query_key_hash_verifyThese names are all over the place. This commit renames them as follows:
collect_active_query_jobs{,_inner}alloc_self_profile_query_strings{,_inner}encode_query_values{,_inner}verify_query_key_hashes{,_inner}This:
_innerfor all the inners (which makes sense now that the inners are all next to their callers)_query_consistentlyall, because the plurals are enoughvaluesinstead ofresultscollect/gatherdistinction, which is no longer importantr? @Zalathar