rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.88k stars 12.78k forks source link

Tracking Issue for `vec_deque_iter_as_slices` #133253

Open zopsicle opened 5 days ago

zopsicle commented 5 days ago

Feature gate: #![feature(vec_deque_iter_as_slices)]

This is a tracking issue for:

Each of these functions obtains a pair of slices from a VecDeque iterator, similar to VecDeque::as_slices.

Public API

use std::collections::vec_deque::{Iter, IterMut};

impl<'a, T> Iter<'a, T> {
    pub fn as_slices(&self) -> (&'a [T], &'a [T]) { ... }
}

impl<'a, T> IterMut<'a, T> {
    pub fn into_slices(self) -> (&'a mut [T], &'a mut [T]) { ... }
    pub fn as_slices(&self) -> (&[T], &[T]) { ... }
    pub fn as_mut_slices(&mut self) -> (&mut [T], &mut [T]) { ... }
}

Steps / History

Unresolved Questions