diff --git a/crates/red_knot_python_semantic/src/types.rs b/crates/red_knot_python_semantic/src/types.rs index cf14143b1414f8..1b2f79290b05cb 100644 --- a/crates/red_knot_python_semantic/src/types.rs +++ b/crates/red_knot_python_semantic/src/types.rs @@ -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::(); + let second_elements = second_elements.iter().collect::(); 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::(); + let first_negative = first.negative(db).iter().collect::(); - 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::(); + let second_negative = second.negative(db).iter().collect::(); iter::zip(first_positive, second_positive).all(equal) && iter::zip(first_negative, second_negative).all(equal)