Best practice for borrowed resources in systems?
Đang mở
question
- Ngôn ngữ chính
- Rust
- Star
- 2.6k
- Fork
- 215
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.