Refactor to use SharedString
in more places (#23813)
Splitting this off from https://github.com/zed-industries/zed/pull/23808, per @maxdeviant's suggestion! Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
92a1cb893f
commit
33d1145c3f
15 changed files with 45 additions and 25 deletions
|
@ -256,7 +256,7 @@ impl CachedLspAdapter {
|
|||
|
||||
pub fn language_id(&self, language_name: &LanguageName) -> String {
|
||||
self.language_ids
|
||||
.get(language_name.0.as_ref())
|
||||
.get(language_name.as_ref())
|
||||
.cloned()
|
||||
.unwrap_or_else(|| language_name.lsp_id())
|
||||
}
|
||||
|
@ -1462,7 +1462,7 @@ impl Language {
|
|||
self.config
|
||||
.code_fence_block_name
|
||||
.clone()
|
||||
.unwrap_or_else(|| self.config.name.0.to_lowercase().into())
|
||||
.unwrap_or_else(|| self.config.name.as_ref().to_lowercase().into())
|
||||
}
|
||||
|
||||
pub fn context_provider(&self) -> Option<Arc<dyn ContextProvider>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue