array-tools

A little collection of array-related utils aiming to make life easier.


Keywords
no_std, array, iterator, no-std, rust
Licenses
Apache-2.0/MIT

Documentation

Array Tools

Crate Documentation Build Status

<<<<<<< HEAD A collection of tools to help dealing with our beloved ❤️ fixed size arrays (Including generic contexts).

A collection of tools that make it easier to work with arrays.

2c71227 (Crate transition to const generics.)

All currently supported features are no_std compatible.

use array_tools as at;

let left: [usize; 4] = at::init_with_mapped_idx(|idx| idx + 1);
let right: [usize; 3] = at::init_with_iter(5..8).unwrap();

let joined: [usize; 7] = at::join(left, right);

let (left, right): ([usize; 2], [usize; 5]) = at::split(joined);

assert_eq!(left, [1, 2]);
assert_eq!(right, [3, 4, 5, 6, 7]);

License

Licensed under the terms of either Apache 2.0 or MIT license.