From e59d8f96ac3046f40e85cc44bce632f21e0cc615 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Thu, 11 Dec 2025 16:32:41 -0800 Subject: [PATCH] clippy fix --- crates/ty_python_semantic/src/types/infer/builder.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/ty_python_semantic/src/types/infer/builder.rs b/crates/ty_python_semantic/src/types/infer/builder.rs index 75b1f6eb80..e4a488dc7e 100644 --- a/crates/ty_python_semantic/src/types/infer/builder.rs +++ b/crates/ty_python_semantic/src/types/infer/builder.rs @@ -5636,10 +5636,11 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> { // `int | float | complex`. These are allowed because that's what `float` and `complex` // expand into in type position. We don't currently ask whether the union was implicit // or explicit, so the explicit version is also allowed. - Type::Union(union_ty) => match union_ty.known(self.db()) { - Some(KnownUnion::Float) | Some(KnownUnion::Complex) => return, - _ => {} - }, + Type::Union(union_ty) => { + if let Some(KnownUnion::Float | KnownUnion::Complex) = union_ty.known(self.db()) { + return; + } + } // `Unknown` is likely to be the result of an unresolved import or a typo, which will // already get a diagnostic, so don't pile on an extra diagnostic here. Type::Dynamic(DynamicType::Unknown) => return,