Unchecked indexing through the regular index syntax.
Using a wrapper type that requires an
unsafe block to create.
- crates.io: https://crates.io/crates/unchecked-index
- travis: https://travis-ci.org/bluss/unchecked-index
Note: All unchecked indexing here is actually “checked” with debug
assertions when they are enabled (they are off by default in release
builds). This is a feature! Debug checking does not make your code safe,
but it helps finding bugs in
unsafe code. Test your code responsibly.
use unchecked_index; /// unsafe because: trusts the permutation to be correct unsafe
How to contribute:
- Fix a bug or implement a new thing
- Include tests for your new feature
- Make a pull request
- Add support for unchecked indexing with ranges (“slicing”)
- Add two free functions,
Copyimpl (for shared slices)
- Initial release