WIP

Antonio Scandurra created

Change summary

crates/gpui2/src/app/entity_map.rs | 3 +++
crates/gpui2/src/assets.rs         | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)

Detailed changes

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 {

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>>;
 }