fn as_consumer(&mut self) -> CollectConsumer<'_, T> {
        // Reserve the new space.
        self.vec.reserve(self.len);

        // Get a correct borrow, then extend it for the newly added length.
        let start = self.vec.len();
        let mut slice = &mut self.vec[start..];
        slice = unsafe { slice::from_raw_parts_mut(slice.as_mut_ptr(), self.len) };
        CollectConsumer::new(&self.writes, slice)
    }
/// Create a consumer on a slice of our memory.
Create a consumer on a slice of our memory.
Create a consumer on a slice of our memory .
fn as_consumer(&mut self) -> CollectConsumer<'_, T> {
        // Reserve the new space.
        self.vec.reserve(self.len);
        // Get a correct borrow, then extend it for the newly added length.
        let start = self.vec.len();
        let mut slice = &mut self.vec[start..];
        slice = unsafe { slice::from_raw_parts_mut(slice.as_mut_ptr(), self.len) };
        CollectConsumer::new(&self.writes, slice)
    }
fn as_consumer ( & mut self ) -> CollectConsumer < ' _ , T > { // Reserve the new space. self . vec . reserve ( self . len ) ; // Get a correct borrow, then extend it for the newly added length. let start = self . vec . len ( ) ; let mut slice = & mut self . vec [ start .. ] ; slice = unsafe { slice :: from_raw_parts_mut ( slice . as_mut_ptr ( ) , self . len ) } ; CollectConsumer :: new ( & self . writes , slice ) }
Create a consumer on a slice of our memory.
Create a consumer on a slice of our memory .
&mut self