use index_ext::tag::{Constant, ConstantSource, Slice};
pub fn foo1(a: &mut Slice<u8, Constant<Min10>>) {
let idx = Constant::<Min10>::EXACT_SIZE.into_len().range_to_self();
for i in a.get_safe_mut(idx) {
*i = 0;
}
}
pub struct Min10;
impl ConstantSource for Min10 {
const LEN: usize = 10;
}
fn main() {
let mut buffer = [0u8; 12];
let buffer = Slice::new_mut(&mut buffer[..], Constant::<Min10>::EXACT_SIZE).unwrap();
foo1(buffer);
}