amethyst / amethyst/specs

Add way of getting multiple mutable references from storages

Aperta
#336 13 commenti 0 reazioni 0 assegnatari Vedi su GitHub
discussion
Lingua principale
Rust
Stelle
2.6k
Fork
215
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Add API that allows getting multiple mutable references from a storage in a way that preserves correctness.
If we had integer generics we could provide generic API:
```rust
fn get_muts(&mut self, [Entity; N]) -> Option<[&mut T; N]>;
```
Right now we could provide more specific instances of it.

The API should be restricted to `DistinctStorage`s and should check that parameter indices are different.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.