You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on clippy lints #8336, I encountered a bug where a loop goes iterates on 0..xyz.len() -1 to use copy() on a element and treat the last element xyz[xyz.len() - 1] after the loop without the copy().
This seems like an optimization.
Development Task
While working on clippy lints #8336, I encountered a bug where a loop goes iterates on
0..xyz.len() -1
to usecopy()
on a element and treat the last elementxyz[xyz.len() - 1]
after the loop without thecopy()
.This seems like an optimization.
But in the case of this loop
tikv/components/cdc/src/delegate.rs
Line 365 in c021e23
There are several other places that uses this optimization in the code. They may need inspection to prevent similar bugs.
Note: this particular bug is fixed in #8890
The text was updated successfully, but these errors were encountered: