Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Dec 30, 2024
1 parent bc545bd commit 3234f80
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/red_knot_python_semantic/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1474,18 +1474,18 @@ impl<'db> Type<'db> {
return false;
}

let first_elements = OrderedTypeSet::from_iter(first_elements.iter());
let second_elements = OrderedTypeSet::from_iter(second_elements.iter());
let first_elements = first_elements.iter().collect::<OrderedTypeSet>();
let second_elements = second_elements.iter().collect::<OrderedTypeSet>();

iter::zip(first_elements, second_elements).all(equal)
}

(Type::Intersection(first), Type::Intersection(second)) => {
let first_positive = OrderedTypeSet::from_iter(first.positive(db).iter());
let first_negative = OrderedTypeSet::from_iter(first.negative(db).iter());
let first_positive = first.positive(db).iter().collect::<OrderedTypeSet>();
let first_negative = first.negative(db).iter().collect::<OrderedTypeSet>();

let second_positive = OrderedTypeSet::from_iter(second.positive(db).iter());
let second_negative = OrderedTypeSet::from_iter(second.negative(db).iter());
let second_positive = second.positive(db).iter().collect::<OrderedTypeSet>();
let second_negative = second.negative(db).iter().collect::<OrderedTypeSet>();

iter::zip(first_positive, second_positive).all(equal)
&& iter::zip(first_negative, second_negative).all(equal)
Expand Down

0 comments on commit 3234f80

Please sign in to comment.