mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
10aa3d3f89
Add `[T; N]::as_[mut_]slice` Part of me trying to populate arrays with a couple of basic useful methods, like slices already have. The ability to add methods to arrays were added in #75212. Tracking issue: #76118 This adds: ```rust impl<T, const N: usize> [T; N] { pub fn as_slice(&self) -> &[T]; pub fn as_mut_slice(&mut self) -> &mut [T]; } ``` These methods are like the ones on `std::array::FixedSizeArray` and in the crate `arraytools`. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |