-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Implement RelationshipSourceCollection for IndexSet
#18471
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
Implement RelationshipSourceCollection for IndexSet
#18471
Conversation
| } | ||
|
|
||
| fn reserve(&mut self, additional: usize) { | ||
| self.0.reserve(additional); |
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.
This trait impl should not rely on crate-public fields, but use an explicit deref_mut() call instead!
ec0ce67 to
2f2f64e
Compare
| pub trait MapEntities { | ||
| /// Updates all [`Entity`] references stored inside using `entity_mapper`. | ||
| /// | ||
| /// Implementors should look up any and all [`Entity`] values stored within `self` and |
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 wonder, what exactly lints this correction? It is not a typo, both are correct, and the "o" version is more common in this context I believe
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'm using this extensions https://marketplace.visualstudio.com/items/?itemName=tekumara.typos-vscode. Which supposedly uses https://github.com/crate-ci/typos.
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.
ah I see, then it seems that the vscode extension hasn't updated its crate-ci version yet, the newer versions of which no longer lint "implementor".
|
small nit, the various set types are re-exported in the |
796b80c to
bb7fd75
Compare
crates/bevy_ecs/src/relationship/relationship_source_collection.rs
Outdated
Show resolved
Hide resolved
crates/bevy_ecs/src/relationship/relationship_source_collection.rs
Outdated
Show resolved
Hide resolved
crates/bevy_ecs/src/relationship/relationship_source_collection.rs
Outdated
Show resolved
Hide resolved
…8471) # Objective `IndexSet` doesn't implement `RelationshipSourceCollection` ## Solution Implement `MapEntities` for `IndexSet` Implement `RelationshipSourceCollection` for `IndexSet` ## Testing `cargo clippy` --------- Co-authored-by: François Mockers <mockersf@gmail.com> Co-authored-by: François Mockers <francois.mockers@vleue.com>
Objective
IndexSetdoesn't implementRelationshipSourceCollectionSolution
Implement
MapEntitiesforIndexSetImplement
RelationshipSourceCollectionforIndexSetTesting
cargo clippy