Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic maskedstorage #668

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

Rua
Copy link

@Rua Rua commented Jan 9, 2020

Fixes #664

API changes

This changes three things:

  • UnprotectedStorage has its item type as an associated type rather than as a generic type parameter.
  • The type parameter of MaskedStorage is now the inner storage, rather than the item type.
    This allows any item to be stored in a MaskedStorage, rather than only Components.
  • MaskedStorage now has contains, get and get_mut methods.

@Rua
Copy link
Author

Rua commented Jan 9, 2020

There's two errors remaining that I can't figure out. They seem to have to do with the definitions of ReadStorage and WriteStorage, which are type aliases. If I substitute them for their definitions at the site of the error, the error goes away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn MaskedStorage into a safe wrapper around UnprotectedStorage
1 participant