Merge branch 'gpui2' into marshall/gpui2-playground

This commit is contained in:
Marshall Bowers
2023-10-04 10:33:40 -04:00
39 changed files with 2605 additions and 1041 deletions
+10
View File
@@ -1,4 +1,5 @@
use std::{
borrow::Cow,
fmt::{self, Debug},
sync::Arc,
};
@@ -47,6 +48,15 @@ impl From<String> for ArcCow<'_, str> {
}
}
impl<'a> From<Cow<'a, str>> for ArcCow<'a, str> {
fn from(value: Cow<'a, str>) -> Self {
match value {
Cow::Borrowed(borrowed) => Self::Borrowed(borrowed),
Cow::Owned(owned) => Self::Owned(owned.into()),
}
}
}
impl<'a, T: ?Sized + ToOwned> std::borrow::Borrow<T> for ArcCow<'a, T> {
fn borrow(&self) -> &T {
match self {