The way I match different length slices right now is just plain terrible. This way it is really hard to match on [usize; 99] for example. What is the best way to do this if I want to keep the match and the function signatures?
fn do_thing(numbers: &[usize]) {
match numbers {
[a, b, c] => handle_three([*a, *b, *c]), // signiture is handle_three(_: [usize; 3])
[a, b, c, d] => handle_four([*a, *b, *c, *d]), // signiture is handle_four(_: [usize; 4])
_ => panic!("Must be exactly 3 or 4 numbers!"),
}
}