pub fn push(&mut self, value: T) {
        // This will panic or abort if we would allocate > isize::MAX bytes
        // or if the length increment would overflow for zero-sized types.
        if self.len == self.buf.capacity() {
            self.reserve(1);
        }
        unsafe {
            let end = self.as_mut_ptr().add(self.len);
            ::std::ptr::write(end, value);
            self.len += 1;
        }
    }
/// Appends an element to the back of a collection.
///
/// # Panics
///
/// Panics if the number of elements in the vector overflows a `usize`.
Appends an element to the back of a collection.
Appends an element to the back of a collection .
pub fn push(&mut self, value: T) {
        // This will panic or abort if we would allocate > isize::MAX bytes
        // or if the length increment would overflow for zero-sized types.
        if self.len == self.buf.capacity() {
            self.reserve(1);
        }
        unsafe {
            let end = self.as_mut_ptr().add(self.len);
            ::std::ptr::write(end, value);
            self.len += 1;
        }
    }
pub fn push ( & mut self , value : T ) { // This will panic or abort if we would allocate > isize::MAX bytes // or if the length increment would overflow for zero-sized types. if self . len == self . buf . capacity ( ) { self . reserve ( 1 ) ; } unsafe { let end = self . as_mut_ptr ( ) . add ( self . len ) ; :: std :: ptr :: write ( end , value ) ; self . len += 1 ; } }
Appends an element to the back of a collection.
Appends an element to the back of a collection .
&mut self
value
T
panics
Panics if the number of elements in the vector overflows a `usize`.
Panics if the number of elements in the vector overflows a ` usize ` .