MCPcopy Create free account
hub / github.com/Lokathor/tinyvec / insert

Method insert

src/arrayvec.rs:571–574  ·  view source on GitHub ↗
(&mut self, index: usize, item: A::Item)

Source from the content-addressed store, hash-verified

569 /// ```
570 #[inline]
571 pub fn insert(&mut self, index: usize, item: A::Item) {
572 let x = self.try_insert(index, item);
573 assert!(x.is_none(), "ArrayVec::insert> capacity overflow!");
574 }
575
576 /// Tries to insert an item at the position given, moving all following
577 /// elements +1 index.

Callers 1

dropMethod · 0.45

Calls 1

try_insertMethod · 0.80

Tested by

no test coverage detected