Skip to content

Commit

Permalink
Per review
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Feb 1, 2025
1 parent ca0a0ed commit fe686f0
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ pub(crate) fn custom_type_var_return_type(
.posonlyargs
.iter()
.chain(&parameters.args)
.next()
.and_then(|parameter_with_default| parameter_with_default.parameter.annotation.as_ref())?;
.next()?
.parameter
.annotation
.as_ref()?;

let decorator_list = &*function_def.decorator_list;

Expand Down Expand Up @@ -324,13 +326,13 @@ fn replace_custom_typevar_with_self(
typevar_name,
));

if let Some(mut edits) = replace_typevar_usages_with_self(
if let Some(edits) = replace_typevar_usages_with_self(
typevar,
&self_symbol_binding,
replace_references_range,
checker.semantic(),
) {
other_edits.append(&mut edits);
other_edits.extend(edits);
} else {
applicability = Applicability::DisplayOnly;
}
Expand Down

0 comments on commit fe686f0

Please sign in to comment.