Use const
over static
for string literals (#18635)
I noticed a few places where we were storing `&'static str`s in `static`s instead of `const`s. This PR updates them to use `const`. Release Notes: - N/A
This commit is contained in:
parent
2cd12f84de
commit
167af4bc1d
8 changed files with 9 additions and 9 deletions
|
@ -9,7 +9,7 @@ use crate::lsp_ext::find_specific_language_server_in_selection;
|
|||
|
||||
use crate::{element::register_action, Editor, SwitchSourceHeader};
|
||||
|
||||
static CLANGD_SERVER_NAME: &str = "clangd";
|
||||
const CLANGD_SERVER_NAME: &str = "clangd";
|
||||
|
||||
fn is_c_language(language: &Language) -> bool {
|
||||
return language.name() == "C++".into() || language.name() == "C".into();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue