Rollup merge of #26164 - tafia:early-dedup, r=Gankro
No need to dedup if there is only 1 element in the vec, can early return
This commit is contained in:
commit
bd7a6ec8ec
1 changed files with 1 additions and 1 deletions
|
@ -1213,7 +1213,7 @@ impl<T: PartialEq> Vec<T> {
|
|||
// Duplicate, advance r. End of vec. Truncate to w.
|
||||
|
||||
let ln = self.len();
|
||||
if ln < 1 { return; }
|
||||
if ln <= 1 { return; }
|
||||
|
||||
// Avoid bounds checks by using raw pointers.
|
||||
let p = self.as_mut_ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue