fix bug in Vec.push

the length of the vector wasn't being incremented
This commit is contained in:
Jorge Aparicio 2017-03-17 12:07:23 -05:00
parent 1d9cdb1ae1
commit 2d8ff5b066

View File

@ -125,6 +125,7 @@ impl<T, A> Vec<T, A>
unsafe {
*slice.as_mut_ptr().offset(self.len as isize) = elem;
}
self.len += 1;
Ok(())
}
}