#2d-array #array #slice #no-std #array2d

no-std slice2d

Ergonomic array slice for 2d array manipulation

2 releases

0.1.1 May 27, 2024
0.1.0 May 27, 2024

#10 in #2d-array

MIT/Apache

8KB
149 lines

slice2d

Ergonomic array slice for 2d array manipulation.

Example

let vector = vec![1, 2, 3, 4, 5, 6];
let slice = vector.get_slice2d(3, 2).unwrap();
assert_eq!(slice[2][0], 5);
assert_eq!(&slice[1], &[3, 4]);

lib.rs:

Ergonomic array slice for 2d array manipulation.

Example

let array = [1, 2, 3, 4, 5, 6];
let slice = array.get_slice2d(3, 2).unwrap();
assert_eq!(slice[2][0], 5);
assert_eq!(&slice[1], &[3, 4]);

No runtime deps