Skip to content
Snippets Groups Projects
Commit 2d8ff5b0 authored by Jorge Aparicio's avatar Jorge Aparicio
Browse files

fix bug in Vec.push

the length of the vector wasn't being incremented
parent 1d9cdb1a
No related branches found
No related tags found
No related merge requests found
...@@ -125,6 +125,7 @@ impl<T, A> Vec<T, A> ...@@ -125,6 +125,7 @@ impl<T, A> Vec<T, A>
unsafe { unsafe {
*slice.as_mut_ptr().offset(self.len as isize) = elem; *slice.as_mut_ptr().offset(self.len as isize) = elem;
} }
self.len += 1;
Ok(()) Ok(())
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment