summaryrefslogtreecommitdiff
path: root/.clippy.toml
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2024-07-23 18:59:07 +0200
committerDanilo Krummrich <dakr@kernel.org>2024-10-08 16:27:50 +0200
commit09403321710d94abaa3e12a07eb5391490117bd4 (patch)
treebf5cf0f6349c53d57396ffeb4346d632f41ed3be /.clippy.toml
parentc52da76703ca7e646fead341c8203eef3827394a (diff)
rust: alloc: implement `IntoIterator` for `Vec`
Implement `IntoIterator` for `Vec`, `Vec`'s `IntoIter` type, as well as `Iterator` for `IntoIter`. `Vec::into_iter` disassembles the `Vec` into its raw parts; additionally, `IntoIter` keeps track of a separate pointer, which is incremented correspondingsly as the iterator advances, while the length, or the count of elements, is decremented. This also means that `IntoIter` takes the ownership of the backing buffer and is responsible to drop the remaining elements and free the backing buffer, if it's dropped. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to '.clippy.toml')
0 files changed, 0 insertions, 0 deletions