Skip to content

Commit b700a31

Browse files
committed
move if guard
1 parent 1b94bbd commit b700a31

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/ty_python_semantic/src/types/constraints.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,12 +2103,12 @@ impl<'db> SequentMap<'db> {
21032103
let upper = constraint.upper(db);
21042104
match (lower, upper) {
21052105
// Case 1
2106-
(Type::TypeVar(lower_typevar), Type::TypeVar(upper_typevar))
2107-
if !lower_typevar.is_same_typevar_as(db, upper_typevar) =>
2108-
{
2109-
let post_constraint =
2110-
ConstrainedTypeVar::new(db, lower_typevar, Type::Never, upper);
2111-
self.add_single_implication(constraint, post_constraint);
2106+
(Type::TypeVar(lower_typevar), Type::TypeVar(upper_typevar)) => {
2107+
if !lower_typevar.is_same_typevar_as(db, upper_typevar) {
2108+
let post_constraint =
2109+
ConstrainedTypeVar::new(db, lower_typevar, Type::Never, upper);
2110+
self.add_single_implication(constraint, post_constraint);
2111+
}
21122112
}
21132113

21142114
// Case 2

0 commit comments

Comments
 (0)