Skip to content

Add World::query_unchecked - #444

Draft
da-shalev wants to merge 1 commit into
Ralith:masterfrom
da-shalev:query-unchecked
Draft

Add World::query_unchecked#444
da-shalev wants to merge 1 commit into
Ralith:masterfrom
da-shalev:query-unchecked

Conversation

@da-shalev

@da-shalev da-shalev commented Jul 6, 2026

Copy link
Copy Markdown

Issue: #443

This adds:

pub unsafe fn query_unchecked<Q: Query>(&self) -> QueryMut<'_, Q>

@da-shalev
da-shalev marked this pull request as draft July 6, 2026 21:54

@Ralith Ralith left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation strategy LGTM; approval pending evidence that there's meaningful benefit.

Comment thread src/query.rs

impl<'q, Q: Query> QueryMut<'q, Q> {
pub(crate) fn new(world: &'q mut World) -> Self {
pub(crate) fn new(world: &'q World) -> Self {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ease of maintenance, this should be unsafe, with the same invariant as on the World method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants