Skip to content

Commit 2d09d69

Browse files
committed
internal: fix crash inside filter_unnecessary_bounds for a missing generic param
1 parent 57fda12 commit 2d09d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/generate_function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ fn filter_unnecessary_bounds(
908908
}
909909
}
910910

911-
let starting_nodes = necessary_params.iter().map(|param| param_map[param]);
911+
let starting_nodes = necessary_params.iter().flat_map(|param| param_map.get(param).copied());
912912
let reachable = graph.compute_reachable_nodes(starting_nodes);
913913

914914
// Not pretty, but effective. If only there were `Vec::retain_index()`...

0 commit comments

Comments
 (0)