(&mut self, same_bucket: F)
| 1233 | /// De-duplicates the vec according to the predicate given. |
| 1234 | #[inline(always)] |
| 1235 | pub fn dedup_by<F>(&mut self, same_bucket: F) |
| 1236 | where |
| 1237 | F: FnMut(&mut A::Item, &mut A::Item) -> bool, |
| 1238 | { |
| 1239 | let len = { |
| 1240 | let (dedup, _) = self.as_mut_slice().partition_dedup_by(same_bucket); |
| 1241 | dedup.len() |
| 1242 | }; |
| 1243 | self.truncate(len); |
| 1244 | } |
| 1245 | |
| 1246 | /// De-duplicates the vec according to the key selector given. |
| 1247 | #[inline(always)] |
no test coverage detected