Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Silence Rust-Analyzer false-positive (#23724)

João Marcos2256c218415b
diff --git a/crates/language/src/language.rs b/crates/language/src/language.rs
index 45e1652e40c..ea2243031ff 100644
--- a/crates/language/src/language.rs
+++ b/crates/language/src/language.rs
@@ -1563,7 +1563,7 @@ impl LanguageScope {
self.config_override().map(|o| &o.line_comments),
Some(&self.language.config.line_comments),
)
- .map_or(&[] as &[_], |e| e.as_slice())
+ .map_or([].as_slice(), |e| e.as_slice())
}
pub fn block_comment_delimiters(&self) -> Option<(&Arc<str>, &Arc<str>)> {