/// use std::collections::RingBuf;
///
/// let mut buf = RingBuf::with_capacity(15);
- /// buf.extend(0u..4);
+ /// buf.extend(0..4);
/// assert_eq!(buf.capacity(), 15);
/// buf.shrink_to_fit();
/// assert!(buf.capacity() >= 4);
#[stable(feature = "rust1", since = "1.0.0")]
impl<A> IndexMut<usize> for RingBuf<A> {
- type Output = A;
-
#[inline]
fn index_mut(&mut self, i: &usize) -> &mut A {
self.get_mut(*i).expect("Out of bounds access")