Rust 1.93 landed the following stable API: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_array
I noticed our AsArrayMut should probably be AsMutArray among other things. Maybe we could release a hybrid-array v0.5 prior to stabilization which cleans some things up. Too late!
I also thought it might be interesting to support an API like that: returning an optional array reference if the slice is sized appropriately. We also have a few other "slice helper" methods currently defined on Array (where they can be const fn) but perhaps we could use a SliceExt as well with extension methods for slices (so long as the names don't clash, which seems hard, maybe we could look at the *array* methods on slices and make parallel harray methods?) Edit: opened #168
Rust 1.93 landed the following stable API: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_array
I noticed our
AsArrayMutshould probably beAsMutArrayamong other things.Maybe we could release aToo late!hybrid-arrayv0.5 prior to stabilization which cleans some things up.I also thought it might be interesting to support an API like that: returning an optional array reference if the slice is sized appropriately. We also have a few other "slice helper" methods currently defined on
Array(where they can beconst fn) but perhaps we could use aSliceExtas well with extension methods for slices (so long as the names don't clash, which seems hard, maybe we could look at the*array*methods on slices and make parallel harray methods?) Edit: opened #168