插入和删除

    1. pub fn remove(&mut self, index: usize) -> T {
    2. // 注意:<是因为我们不能删除所有元素之后的位置
    3. self.len -= 1;
    4. let result = ptr::read(self.ptr.offset(index as isize));
    5. ptr::copy(self.ptr.offset(index as isize + 1),
    6. self.len - index);
    7. result
    8. }