Best practice for borrowed resources in systems?
Offen
question
- Vorherrschende Sprache
- Rust
- Sterne
- 2.6k
- Forks
- 215
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I'm halfway through the [Roguelike tutorial](https://bfnightly.bracketproductions.com/rustbook/) and I would like to move my render logic into a `System` and use a `Dispatcher` instead of manually running systems. In this case `bracket-lib` has a `tick` where you mutably borrow a `BTerm` instance, but it feels like this is a common pattern where some kind of context is mutably borrowed.
What's the best practice here? Should we just build a dispatcher per tick and pass the context in the system struct?
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.