/**
    Rearranges content of the buffer to achieve a continuous region.

    # Example

    ```
    use advanced_collections::circular_buffer::CircularBuffer;

    fn main(){
      let mut cb = CircularBuffer::from(vec![1,2,3]);
      cb.push_back(4);
      cb.push_back(5);
      //slices() would now return [3,4], [5]
      assert_eq!(cb.linearize(), [3,4,5].as_ref());
    }
    ```
    */
Rearranges content of the buffer to achieve a continuous region.
Rearranges content of the buffer to achieve a continuous region .
pub fn linearize(&mut self) -> &mut [T]{
        self.buffer.rotate_left(self.start);
        self.end = self.len();
        self.start = 0;
        //ManuallyDrop is a zero-cost wrapper, can be safely converted into slice of T
        unsafe{transmute(&mut self.buffer[..self.end])}
    }
pub fn linearize ( & mut self ) -> & mut [ T ] { self . buffer . rotate_left ( self . start ) ; self . end = self . len ( ) ; self . start = 0 ; //ManuallyDrop is a zero-cost wrapper, can be safely converted into slice of T unsafe { transmute ( & mut self . buffer [ .. self . end ] ) } }
Rearranges content of the buffer to achieve a continuous region.
Rearranges content of the buffer to achieve a continuous region .
&mut self
example
```
use advanced_collections::circular_buffer::CircularBuffer.


` ` ` use advanced_collections :: circular_buffer :: CircularBuffer .