track_caller for capacity overflow panics

This commit is contained in:
Kornel
2023-04-10 22:45:18 +01:00
parent 0e131fd781
commit dc33f756d0
3 changed files with 11 additions and 0 deletions
+1
View File
@@ -35,6 +35,7 @@ pub(crate) trait ArrayVecImpl {
/// Return a raw mutable pointer to the vector's buffer.
fn as_mut_ptr(&mut self) -> *mut Self::Item;
#[track_caller]
fn push(&mut self, element: Self::Item) {
self.try_push(element).unwrap()
}