aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/mem-phys-addr.py
diff options
context:
space:
mode:
authorDanilo Krummrich <[email protected]>2024-10-04 17:41:21 +0200
committerMiguel Ojeda <[email protected]>2024-10-15 23:10:32 +0200
commit1d1d223aa3b37c34271aefc2706340d0843bfcb2 (patch)
tree9846f4ed7c0058e53ec1b5d785385e1a11a35dd2 /tools/perf/scripts/python/mem-phys-addr.py
parent2aac4cd7dae3d7bb0e0ddec2561b2ee4cbe6c8f6 (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 correspondingly 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 <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Gary Guo <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Fixed typos. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions