We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60a5cbd commit fc32b72Copy full SHA for fc32b72
compiler-core/src/language_server/code_action.rs
@@ -1432,10 +1432,11 @@ impl<'ast> ast::visit::Visit<'ast> for AnnotateTopLevelDefinitions<'_> {
1432
let arguments_to_annotate = fun
1433
.arguments
1434
.iter()
1435
- .filter(|argument| argument.annotation.is_none());
1436
- let return_annotation_needed = fun.return_annotation.is_none();
+ .filter(|argument| argument.annotation.is_none())
+ .collect::<Vec<_>>();
1437
+ let needs_return_annotation = fun.return_annotation.is_none();
1438
- if arguments_to_annotate.is_empty() && !return_annotation_needed {
1439
+ if arguments_to_annotate.is_empty() && !needs_return_annotation {
1440
return;
1441
}
1442
0 commit comments