Skip to content

Commit a35422a

Browse files
committed
Auto merge of #17488 - alibektas:17485/duplicate_snippets, r=alibektas
minor : Fix duplicate snippets showing up on hover. With each `config::apply_change` duplicate configs were being added. Now we first drain the vec that holds these and then start adding. This fixes #17485
2 parents 0cb22db + 443ba25 commit a35422a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,9 @@ impl Config {
844844
config.source_root_parent_map = source_root_map;
845845
}
846846

847+
// IMPORTANT : This holds as long as ` completion_snippets_custom` is declared `client`.
848+
config.snippets.clear();
849+
847850
let snips = self.completion_snippets_custom().to_owned();
848851

849852
for (name, def) in snips.iter() {

0 commit comments

Comments
 (0)