Fix larger than necessary allocations in streamer (#8187) (#8191)

automerge
This commit is contained in:
mergify[bot]
2020-02-10 12:52:16 -08:00
committed by GitHub
parent 772cf8288c
commit da843a7ace
4 changed files with 43 additions and 10 deletions

View File

@@ -151,6 +151,10 @@ impl<T: Clone + Default + Sized> PinnedVec<T> {
pub fn iter_mut(&mut self) -> PinnedIterMut<T> {
PinnedIterMut(self.x.iter_mut())
}
pub fn capacity(&self) -> usize {
self.x.capacity()
}
}
impl<'a, T: Clone + Send + Sync + Default + Sized> IntoParallelIterator for &'a PinnedVec<T> {