lint: add 'static lifetime to const's

This commit is contained in:
Rolo 2024-12-30 07:15:30 -08:00
parent 39638b6394
commit a8ffbaa397

View file

@ -46,7 +46,7 @@ pub struct Lsp {
}
impl Lsp {
const DEFAULT: &str = "*";
const DEFAULT: &'static str = "*";
pub fn file(&self) -> &str {
self.file.as_ref().map_or(Self::DEFAULT, |file| file)
@ -174,7 +174,7 @@ impl Default for Diagnostic {
}
impl Diagnostic {
const DEFAULT: &str = "";
const DEFAULT: &'static str = "";
pub fn hint(&self) -> &str {
self.hint.as_ref().map_or(Self::DEFAULT, |hint| hint)
@ -206,7 +206,7 @@ impl Default for Vcs {
}
impl Vcs {
const DEFAULT: &str = "";
const DEFAULT: &'static str = "";
pub fn icon(&self) -> &str {
self.icon