Docs Build Status

wrapping

Wrapping around for slices.

Implements a wrapper around slices that allows for indexing beyond the length of the slice, by taking the index always modulo the length.

Example

```rust use wrapping::Wrapping;

let array: [&str; 1] = ["hello"]; let wrapping = Wrapping::from(&array[..]);

asserteq!(wrapping[0], "hello"); asserteq!(wrapping[1], "hello"); ```