Skip to content

Commit

Permalink
Fix mutable reborrow
Browse files Browse the repository at this point in the history
Co-authored-by: bluss <bluss@users.noreply.github.com>
  • Loading branch information
niklasf and bluss committed Feb 22, 2021
1 parent 0a79800 commit 200f0a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arrayvec.rs
Expand Up @@ -504,7 +504,7 @@ impl<A: Array> ArrayVec<A> {

while g.processed_len < original_len {
let cur = unsafe { g.v.as_mut_ptr().add(g.processed_len) };
if !f(cur) {
if !f(&mut *cur) {
g.processed_len += 1;
g.deleted_cnt += 1;
unsafe { ptr::drop_in_place(cur) };
Expand Down

0 comments on commit 200f0a3

Please sign in to comment.