mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +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`. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@4083a90168 | ||
core | ||
panic_abort | ||
panic_unwind | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@78891cdf29 | ||
term | ||
test | ||
unwind |