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.

WIP

Antonio Scandurra51338d785ca4
diff --git a/crates/gpui2/src/app/entity_map.rs b/crates/gpui2/src/app/entity_map.rs
index 3ece55fe0af..e626f8c409d 100644
--- a/crates/gpui2/src/app/entity_map.rs
+++ b/crates/gpui2/src/app/entity_map.rs
@@ -450,6 +450,9 @@ pub struct WeakModel<T> {
entity_type: PhantomData<T>,
}
+unsafe impl<T> Send for WeakModel<T> {}
+unsafe impl<T> Sync for WeakModel<T> {}
+
impl<T> Clone for WeakModel<T> {
fn clone(&self) -> Self {
Self {
diff --git a/crates/gpui2/src/assets.rs b/crates/gpui2/src/assets.rs
index baf75b8aabc..39c8562b697 100644
--- a/crates/gpui2/src/assets.rs
+++ b/crates/gpui2/src/assets.rs
@@ -8,7 +8,7 @@ use std::{
sync::atomic::{AtomicUsize, Ordering::SeqCst},
};
-pub trait AssetSource: 'static {
+pub trait AssetSource: 'static + Send + Sync {
fn load(&self, path: &str) -> Result<Cow<[u8]>>;
fn list(&self, path: &str) -> Result<Vec<SharedString>>;
}