Skip to content

Commit

Permalink
Deduplicate markers during normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jun 12, 2024
1 parent cc2e9ec commit 60a63b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/uv-resolver/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ pub(crate) fn normalize(tree: &mut MarkerTree) {
.fold(PubGrubRange::full(), |acc, range| acc.intersection(range))
});

reduced.dedup();
reduced.sort();
reduced.dedup();

*tree = match reduced.len() {
1 => reduced.remove(0),
Expand All @@ -138,8 +138,8 @@ pub(crate) fn normalize(tree: &mut MarkerTree) {
.fold(PubGrubRange::empty(), |acc, range| acc.union(range))
});

reduced.dedup();
reduced.sort();
reduced.dedup();

*tree = match reduced.len() {
1 => reduced.remove(0),
Expand Down

0 comments on commit 60a63b5

Please sign in to comment.