Searched refs:index (Results 1 – 2 of 2) sorted by relevance
/rust/alloc/vec/ |
D | mod.rs | 1304 pub fn swap_remove(&mut self, index: usize) -> T { in swap_remove() 1307 fn assert_failed(index: usize, len: usize) -> ! { in swap_remove() 1312 if index >= len { in swap_remove() 1313 assert_failed(index, len); in swap_remove() 1319 let value = ptr::read(self.as_ptr().add(index)); in swap_remove() 1321 ptr::copy(base_ptr.add(len - 1), base_ptr.add(index), 1); in swap_remove() 1345 pub fn insert(&mut self, index: usize, element: T) { in insert() 1348 fn assert_failed(index: usize, len: usize) -> ! { in insert() 1353 if index > len { in insert() 1354 assert_failed(index, len); in insert() [all …]
|
/rust/alloc/ |
D | slice.rs | 434 let mut index = indices[i].1; in sort_by_cached_key() localVariable 435 while (index as usize) < i { in sort_by_cached_key() 436 index = indices[index as usize].1; in sort_by_cached_key() 438 indices[i].1 = index; in sort_by_cached_key() 439 $slice.swap(i, index as usize); in sort_by_cached_key()
|