refactor: VecDeques IntoIter fields to private
This commit is contained in:
parent
e0c38af27c
commit
05b01cd787
2 changed files with 8 additions and 2 deletions
|
@ -17,7 +17,13 @@ pub struct IntoIter<
|
|||
T,
|
||||
#[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
|
||||
> {
|
||||
pub(crate) inner: VecDeque<T, A>,
|
||||
inner: VecDeque<T, A>,
|
||||
}
|
||||
|
||||
impl<T, A: Allocator> IntoIter<T, A> {
|
||||
pub(super) fn new(inner: VecDeque<T, A>) -> Self {
|
||||
IntoIter { inner }
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "collection_debug", since = "1.17.0")]
|
||||
|
|
|
@ -2827,7 +2827,7 @@ impl<T, A: Allocator> IntoIterator for VecDeque<T, A> {
|
|||
/// Consumes the `VecDeque` into a front-to-back iterator yielding elements by
|
||||
/// value.
|
||||
fn into_iter(self) -> IntoIter<T, A> {
|
||||
IntoIter { inner: self }
|
||||
IntoIter::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue