Skip to content

Commit

Permalink
fix: use get in PartialEq for up-to-date values
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Oct 23, 2023
1 parent a9ac01b commit 2dd067f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ impl<T: Copy + PartialEq> PartialEq for LockFreeFrozenVec<T> {
// Since the lengths are the same, just check the elements in order
for index in 0..self_len {
// This is safe because the indices are in bounds (for `LockFreeFrozenVec` the bounds can only grow).
if unsafe { self.get_unchecked(index) } != unsafe { other.get_unchecked(index) } {
if self.get(index) != other.get(index) {
return false;
}
}
Expand Down

0 comments on commit 2dd067f

Please sign in to comment.