You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While going along with the tutorial, it was mentioned that you couldn't resolve the lifetime issues at the time. I am just dropping this off as a solution with lifetimes. My Renderer component differs slightly from the tutorial one, so I have adapted my code to it for this.
I believe the reason that the lifetimes are necessary, is because EntityBuilder::with() returns Self. This means that the passed EntityBuilder must live at least as long as assign_render is running, and since we build upon the passed builder, the one that we return must also live as long as the passed EntityBuilder, hence the connection between the three.
While going along with the tutorial, it was mentioned that you couldn't resolve the lifetime issues at the time. I am just dropping this off as a solution with lifetimes. My Renderer component differs slightly from the tutorial one, so I have adapted my code to it for this.
I believe the reason that the lifetimes are necessary, is because
EntityBuilder::with()
returnsSelf
. This means that the passedEntityBuilder
must live at least as long asassign_render
is running, and since we build upon the passed builder, the one that we return must also live as long as the passedEntityBuilder
, hence the connection between the three.The text was updated successfully, but these errors were encountered: