Open djmitche opened 9 months ago
https://google.github.io/comprehensive-rust/user-defined-types/aliases.html
The problem is that the only usage is: RwLock<Vec<Arc<RefCell<Item>>>>
And it is hard to spot "Item" in there.
This is one of these instances where a mentor can explain things better but anyone trying to follow it on their own will be puzzled.
Adding a function where we can see the usefulness would be interesting, for example:
fn inventory_into_vec(inv: PlayerInventory) -> Vec<Item> {
// ...
}
Just an example. Could be simpler. But having a practical use where we can showcase the usefulness would be interesting. Although to be fair we don't use type aliases often, or at least I don't.
From my notes:
@deavid I've lost the context for this comment. Now that v2 has landed, do you remember enough to make a PR for this?