bevyengine / bevyengine/bevy

remove `World::get_mut_by_id` and `World::get_by_id`

Open
#7,220 5 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Bug C-Code-Quality M-Migration-Guide
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

`World::get_by_id` has no reason to exist as `EntityRef::get_by_id` accomplishes the same thing as it returns `Ptr<'w>` not `Ptr<'_>`.
`World::get_mut_by_id` should be moved to `EntityMut` as `EntityMut::get_mut_by_id_inner` (name subject to debate although has precedent `Query` has `_inner` methods for stuff that is more flexible with its lifetimes.) It would likely also be a good idea to introduce `EntityMut::get_by_id_inner` (name subject to debate).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.