split_array
Split array references in two with compile-time size validation.
This crate requires nightly!
Unstable features used:
Examples
The sizes of the two halves can usually be inferred:
use SplitArray;
let mut array: = ;
let = array.split_arr_mut;
* left = ;
* right = ;
assert_eq!;
They can be annotated explicitly as well:
use SplitArray;
let array: = ;
let = array. ;
assert_eq!;
assert_eq!;
The annotated size is validated at compile-time. This won't compile:
use SplitArray;
let array: = ;
let = array. ;