Skip to content

Commit

Permalink
simplify deduplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Dec 22, 2023
1 parent f64581c commit 80033b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/algorithm/monadic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,9 @@ impl<T: ArrayValue> Array<T> {
let mut deduped = CowSlice::new();
let mut seen = BTreeSet::new();
let mut new_len = 0;
for row in self.rows() {
if seen.insert(row.clone()) {
deduped.extend_from_slice(&row.data);
for row in self.row_slices() {
if seen.insert(ArrayCmpSlice(row)) {
deduped.extend_from_slice(row);
new_len += 1;
}
}
Expand Down

0 comments on commit 80033b7

Please sign in to comment.