diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-11-28 15:34:53 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-12-06 00:58:40 -0800 |
| commit | a30f96311aa2c0c1614132b1d5dd07bcfa9267fe (patch) | |
| tree | 24772195634940fb0b66a77d110143f12cac0716 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs | |
| parent | 87dce6e8dfdae605c9c2a713cf0133066a52022a (diff) | |
| download | rust-a30f96311aa2c0c1614132b1d5dd07bcfa9267fe.tar.gz rust-a30f96311aa2c0c1614132b1d5dd07bcfa9267fe.zip | |
Add `array::IntoIter::{empty, from_raw_parts}`
`array::IntoIter` has a bunch of really handy logic for dealing with partial arrays, but it's currently hamstrung by only being creatable from a fully-initialized array. This PR adds two new constructors: - a safe & const `empty`, since `[].into_iter()` gives `<T, 0>`, not `<T, N>`. - an unsafe `from_raw_parts`, to allow experimentation with new uses. (Slice & vec iterators don't need `from_raw_parts` because you `from_raw_parts` the slice or vec instead, but there's no useful way to made a `<[T; N]>::from_raw_parts`, so I think this is a reasonable place to have one.)
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions
