Use LanguageServerName in more places (#18167)
This pushes the new LanguageServerName type to more places. As both languages and language servers were identified by Arc<str>, it was sometimes hard to tell which was intended. Release Notes: - N/A
This commit is contained in:
parent
743feb98bc
commit
4f227fd3bf
20 changed files with 150 additions and 85 deletions
|
@ -9,6 +9,13 @@ use util::arc_cow::ArcCow;
|
|||
#[derive(Deref, DerefMut, Eq, PartialEq, PartialOrd, Ord, Hash, Clone)]
|
||||
pub struct SharedString(ArcCow<'static, str>);
|
||||
|
||||
impl SharedString {
|
||||
/// creates a static SharedString
|
||||
pub const fn new_static(s: &'static str) -> Self {
|
||||
Self(ArcCow::Borrowed(s))
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for SharedString {
|
||||
fn default() -> Self {
|
||||
Self(ArcCow::Owned(Arc::default()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue