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

[core] Better read-only bitfield support #531

Merged
merged 1 commit into from Apr 17, 2022
Merged

Commits on Apr 17, 2022

  1. [core] Better read-only bitfield support

    By having 'MutableBitfield' be a subclass of 'BitField' it's possible
    for users of the library to upcast to 'MutableBitField' and do the wrong
    thing.
    
    Follow the pattern of Memory<T>/ReadOnlyMemory<T> and create BitField
    and ReadOnlyBitField.
    
    BitField can be converted to 'ReadOnlyBitField' via an implicit cast,
    and you can create a BitField from a ReadOnlyBitField by using the
    appropriate constructor.
    
    This should make things a little bit clearer.
    alanmcgovern committed Apr 17, 2022
    Configuration menu
    Copy the full SHA
    6ccac02 View commit details
    Browse the repository at this point in the history