mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-28 04:50:34 +00:00
fix bug in Vec.push
the length of the vector wasn't being incremented
This commit is contained in:
parent
1d9cdb1ae1
commit
2d8ff5b066
@ -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(())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user