pub fn dequeue(&mut self) -> Option<T> {
        let n = self.capacity() + 1;

        let head = self.head.get_mut();
        let tail = self.tail.get_mut();

        let buffer: &[T] = unsafe { self.buffer.as_ref() };

        if *head != *tail {
            let item = unsafe { ptr::read(buffer.get_unchecked(*head)) };
            *head = (*head + 1) % n;
            Some(item)
        } else {
            None
        }
    }
/// Returns the item in the front of the queue, or `None` if the queue is empty
Returns the item in the front of the queue, or `None` if the queue is empty
Returns the item in the front of the queue or ` None ` if the queue is empty
pub fn dequeue(&mut self) -> Option<T> {
        let n = self.capacity() + 1;
        let head = self.head.get_mut();
        let tail = self.tail.get_mut();
        let buffer: &[T] = unsafe { self.buffer.as_ref() };
        if *head != *tail {
            let item = unsafe { ptr::read(buffer.get_unchecked(*head)) };
            *head = (*head + 1) % n;
            Some(item)
        } else {
            None
        }
    }
pub fn dequeue ( & mut self ) -> Option < T > { let n = self . capacity ( ) + 1 ; let head = self . head . get_mut ( ) ; let tail = self . tail . get_mut ( ) ; let buffer : & [ T ] = unsafe { self . buffer . as_ref ( ) } ; if * head != * tail { let item = unsafe { ptr :: read ( buffer . get_unchecked ( * head ) ) } ; * head = ( * head + 1 ) % n ; Some ( item ) } else { None } }
Returns the item in the front of the queue, or `None` if the queue is empty
Returns the item in the front of the queue or ` None ` if the queue is empty
&mut self
&mut self