Rest of fixups for gpui2

This commit is contained in:
Piotr Osiewicz 2024-01-02 00:09:24 +01:00
parent 7d420edb84
commit 2621efebea
33 changed files with 184 additions and 196 deletions

View file

@ -60,9 +60,9 @@ impl<'a> PartialEq<&'a str> for SharedString {
}
}
impl Into<Arc<str>> for SharedString {
fn into(self) -> Arc<str> {
match self.0 {
impl From<SharedString> for Arc<str> {
fn from(val: SharedString) -> Self {
match val.0 {
ArcCow::Borrowed(borrowed) => Arc::from(borrowed),
ArcCow::Owned(owned) => owned.clone(),
}
@ -75,9 +75,9 @@ impl<T: Into<ArcCow<'static, str>>> From<T> for SharedString {
}
}
impl Into<String> for SharedString {
fn into(self) -> String {
self.0.to_string()
impl From<SharedString> for String {
fn from(val: SharedString) -> Self {
val.0.to_string()
}
}