Skip to content
Discussion options

You must be logged in to vote

The problem isn't the lifetime, error E0499 is about borrowing as mutable more than once. This happens because you do it in a loop, and it seems the compiler can't detect that there would only be at most one mutable borrow active at the time.

You'd have to do this in two stages, first identify which child has the component (if any), and then borrow mutably for just that one entity.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by haath
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants