Make language settings accessors take an arc dyn file

This commit is contained in:
Max Brunsfeld 2023-05-31 14:57:04 -07:00
parent a2ab7c9eb9
commit 03a351fb26
10 changed files with 41 additions and 54 deletions

View file

@ -285,7 +285,7 @@ impl CopilotButton {
let file = snapshot.file_at(suggestion_anchor).cloned();
self.editor_enabled = Some(
all_language_settings(self.file.as_ref().map(|f| f.as_ref()), cx).copilot_enabled(
all_language_settings(self.file.as_ref(), cx).copilot_enabled(
language_name.as_deref(),
file.as_ref().map(|file| file.path().as_ref()),
),