mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
Avoid cloning Name
when looking up function and class types (#14092)
This commit is contained in:
parent
a7a78f939c
commit
bc0586d922
5 changed files with 27 additions and 4 deletions
|
@ -856,7 +856,7 @@ impl<'db> TypeInferenceBuilder<'db> {
|
|||
};
|
||||
let function_ty = Type::FunctionLiteral(FunctionType::new(
|
||||
self.db,
|
||||
name.id.clone(),
|
||||
&*name.id,
|
||||
function_kind,
|
||||
definition,
|
||||
decorator_tys,
|
||||
|
@ -965,7 +965,7 @@ impl<'db> TypeInferenceBuilder<'db> {
|
|||
|
||||
let class_ty = Type::ClassLiteral(ClassType::new(
|
||||
self.db,
|
||||
name.id.clone(),
|
||||
&*name.id,
|
||||
definition,
|
||||
body_scope,
|
||||
maybe_known_class,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue