Skip to content

Commit

Permalink
simplify match
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Oct 15, 2024
1 parent f7a112e commit efac63d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/red_knot_python_semantic/src/types/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,9 +1191,9 @@ impl<'db> TypeInferenceBuilder<'db> {

let value_ty = self.expression_ty(value);

let target_ty = match (value_ty, kind) {
(_, AssignmentKind::Sequence) => self.infer_sequence_unpacking(target, value_ty, name),
_ => value_ty,
let target_ty = match kind {
AssignmentKind::Sequence => self.infer_sequence_unpacking(target, value_ty, name),
AssignmentKind::Name => value_ty,
};

self.add_binding(name.into(), definition, target_ty);
Expand Down

0 comments on commit efac63d

Please sign in to comment.