Skip to content

Commit fc32b72

Browse files
committed
fix: forgot to collect filter result
1 parent 60a5cbd commit fc32b72

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler-core/src/language_server/code_action.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,10 +1432,11 @@ impl<'ast> ast::visit::Visit<'ast> for AnnotateTopLevelDefinitions<'_> {
14321432
let arguments_to_annotate = fun
14331433
.arguments
14341434
.iter()
1435-
.filter(|argument| argument.annotation.is_none());
1436-
let return_annotation_needed = fun.return_annotation.is_none();
1435+
.filter(|argument| argument.annotation.is_none())
1436+
.collect::<Vec<_>>();
1437+
let needs_return_annotation = fun.return_annotation.is_none();
14371438

1438-
if arguments_to_annotate.is_empty() && !return_annotation_needed {
1439+
if arguments_to_annotate.is_empty() && !needs_return_annotation {
14391440
return;
14401441
}
14411442

0 commit comments

Comments
 (0)