fn move_head(buf: &mut RingBuffer<usize>, count: usize) {
        assert!(!buf.has_elements());
        assert_eq!(buf.len(), 0);

        for _ in 0..count {
            assert!(buf.enqueue(0));
            assert_eq!(buf.dequeue(), Some(0));
        }

        assert!(!buf.has_elements());
        assert_eq!(buf.len(), 0);
    }
// Move the head by `count` elements, by enqueueing/dequeueing `count`
// times an element.
// This assumes an empty queue at the beginning, and yields an empty queue.
Move the head by `count` elements, by enqueueing/dequeueing `count`
times an element.
This assumes an empty queue at the beginning, and yields an empty queue.
Move the head by ` count ` elements by enqueueing / dequeueing ` count ` times an element . This assumes an empty queue at the beginning and yields an empty queue .
fn move_head(buf: &mut RingBuffer<usize>, count: usize) {
        assert!(!buf.has_elements());
        assert_eq!(buf.len(), 0);
        for _ in 0..count {
            assert!(buf.enqueue(0));
            assert_eq!(buf.dequeue(), Some(0));
        }
        assert!(!buf.has_elements());
        assert_eq!(buf.len(), 0);
    }
fn move_head ( buf : & mut RingBuffer < usize > , count : usize ) { assert ! ( buf has_elements ( ) ) ; assert_eq ! ( buf len ( ) 0 ) ; for _ in 0 .. count { assert ! ( buf enqueue ( 0 ) ) ; assert_eq ! ( buf dequeue ( ) Some ( 0 ) ) ; } assert ! ( buf has_elements ( ) ) ; assert_eq ! ( buf len ( ) 0 ) ; }
Move the head by `count` elements, by enqueueing/dequeueing `count`
times an element.
Move the head by ` count ` elements by enqueueing / dequeueing ` count ` times an element .
buf
&mut RingBuffer<usize>
count
usize
buf
&mut RingBuffer<usize>
count
usize