Merge branch 'gpui2' into marshall/gpui2-playground

This commit is contained in:
Marshall Bowers
2023-10-02 18:36:22 -04:00
79 changed files with 19376 additions and 369 deletions
+13 -1
View File
@@ -1,4 +1,7 @@
use std::sync::Arc;
use std::{
fmt::{self, Debug},
sync::Arc,
};
#[derive(PartialEq, Eq)]
pub enum ArcCow<'a, T: ?Sized> {
@@ -72,3 +75,12 @@ impl<T: ?Sized> AsRef<T> for ArcCow<'_, T> {
}
}
}
impl<'a, T: ?Sized + Debug> Debug for ArcCow<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
ArcCow::Borrowed(borrowed) => Debug::fmt(borrowed, f),
ArcCow::Owned(owned) => Debug::fmt(&**owned, f),
}
}
}