@@ -125,7 +125,7 @@ pub struct AssetSourceBuilder {
125125 /// The [`AssetWatcher`] to use for unprocessed assets, if any.
126126 pub watcher : Option <
127127 Box <
128- dyn FnMut ( crossbeam_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
128+ dyn FnMut ( async_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
129129 + Send
130130 + Sync ,
131131 > ,
@@ -138,7 +138,7 @@ pub struct AssetSourceBuilder {
138138 /// The [`AssetWatcher`] to use for processed assets, if any.
139139 pub processed_watcher : Option <
140140 Box <
141- dyn FnMut ( crossbeam_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
141+ dyn FnMut ( async_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
142142 + Send
143143 + Sync ,
144144 > ,
@@ -174,7 +174,7 @@ impl AssetSourceBuilder {
174174 } ;
175175
176176 if watch {
177- let ( sender, receiver) = crossbeam_channel :: unbounded ( ) ;
177+ let ( sender, receiver) = async_channel :: unbounded ( ) ;
178178 match self . watcher . as_mut ( ) . and_then ( |w| w ( sender) ) {
179179 Some ( w) => {
180180 source. watcher = Some ( w) ;
@@ -189,7 +189,7 @@ impl AssetSourceBuilder {
189189 }
190190
191191 if watch_processed {
192- let ( sender, receiver) = crossbeam_channel :: unbounded ( ) ;
192+ let ( sender, receiver) = async_channel :: unbounded ( ) ;
193193 match self . processed_watcher . as_mut ( ) . and_then ( |w| w ( sender) ) {
194194 Some ( w) => {
195195 source. processed_watcher = Some ( w) ;
@@ -226,7 +226,7 @@ impl AssetSourceBuilder {
226226 /// Will use the given `watcher` function to construct unprocessed [`AssetWatcher`] instances.
227227 pub fn with_watcher (
228228 mut self ,
229- watcher : impl FnMut ( crossbeam_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
229+ watcher : impl FnMut ( async_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
230230 + Send
231231 + Sync
232232 + ' static ,
@@ -256,7 +256,7 @@ impl AssetSourceBuilder {
256256 /// Will use the given `watcher` function to construct processed [`AssetWatcher`] instances.
257257 pub fn with_processed_watcher (
258258 mut self ,
259- watcher : impl FnMut ( crossbeam_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
259+ watcher : impl FnMut ( async_channel :: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
260260 + Send
261261 + Sync
262262 + ' static ,
@@ -377,8 +377,8 @@ pub struct AssetSource {
377377 processed_writer : Option < Box < dyn ErasedAssetWriter > > ,
378378 watcher : Option < Box < dyn AssetWatcher > > ,
379379 processed_watcher : Option < Box < dyn AssetWatcher > > ,
380- event_receiver : Option < crossbeam_channel :: Receiver < AssetSourceEvent > > ,
381- processed_event_receiver : Option < crossbeam_channel :: Receiver < AssetSourceEvent > > ,
380+ event_receiver : Option < async_channel :: Receiver < AssetSourceEvent > > ,
381+ processed_event_receiver : Option < async_channel :: Receiver < AssetSourceEvent > > ,
382382}
383383
384384impl AssetSource {
@@ -429,15 +429,13 @@ impl AssetSource {
429429
430430 /// Return's this source's unprocessed event receiver, if the source is currently watching for changes.
431431 #[ inline]
432- pub fn event_receiver ( & self ) -> Option < & crossbeam_channel :: Receiver < AssetSourceEvent > > {
432+ pub fn event_receiver ( & self ) -> Option < & async_channel :: Receiver < AssetSourceEvent > > {
433433 self . event_receiver . as_ref ( )
434434 }
435435
436436 /// Return's this source's processed event receiver, if the source is currently watching for changes.
437437 #[ inline]
438- pub fn processed_event_receiver (
439- & self ,
440- ) -> Option < & crossbeam_channel:: Receiver < AssetSourceEvent > > {
438+ pub fn processed_event_receiver ( & self ) -> Option < & async_channel:: Receiver < AssetSourceEvent > > {
441439 self . processed_event_receiver . as_ref ( )
442440 }
443441
@@ -517,10 +515,9 @@ impl AssetSource {
517515 pub fn get_default_watcher (
518516 path : String ,
519517 file_debounce_wait_time : Duration ,
520- ) -> impl FnMut ( crossbeam_channel:: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > >
521- + Send
522- + Sync {
523- move |sender : crossbeam_channel:: Sender < AssetSourceEvent > | {
518+ ) -> impl FnMut ( async_channel:: Sender < AssetSourceEvent > ) -> Option < Box < dyn AssetWatcher > > + Send + Sync
519+ {
520+ move |sender : async_channel:: Sender < AssetSourceEvent > | {
524521 #[ cfg( all(
525522 feature = "file_watcher" ,
526523 not( target_arch = "wasm32" ) ,
0 commit comments