You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/bevy_asset/src/io/source.rs
+85-85Lines changed: 85 additions & 85 deletions
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ use alloc::{
8
8
sync::Arc,
9
9
};
10
10
use atomicow::CowArc;
11
-
use bevy_ecs::resource::Resource;
12
-
use bevy_platform::collections::HashMap;
11
+
use bevy_platform::collections::{hash_map::Entry,HashMap};
13
12
use core::{fmt::Display, hash::Hash, time::Duration};
13
+
use std::sync::RwLock;
14
14
use thiserror::Error;
15
15
use tracing::warn;
16
16
@@ -174,7 +174,7 @@ impl AssetSourceBuilder {
174
174
watch:bool,
175
175
watch_processed:bool,
176
176
processing_state:Option<Arc<ProcessingState>>,
177
-
) -> AssetSource{
177
+
) -> Arc<AssetSource>{
178
178
let reader = self.reader.as_mut()();
179
179
let writer = self.writer.as_mut().and_then(|w| w(false));
180
180
let processed_writer = self.processed_writer.as_mut().and_then(|w| w(true));
@@ -231,7 +231,7 @@ impl AssetSourceBuilder {
231
231
source.gate_on_processor(processing_state);
232
232
}
233
233
234
-
source
234
+
Arc::new(source)
235
235
}
236
236
237
237
/// Will use the given `reader` function to construct unprocessed [`AssetReader`](crate::io::AssetReader) instances.
@@ -332,84 +332,6 @@ impl AssetSourceBuilder {
332
332
}
333
333
}
334
334
335
-
/// A [`Resource`] that hold (repeatable) functions capable of producing new [`AssetReader`](crate::io::AssetReader) and [`AssetWriter`](crate::io::AssetWriter) instances
/// A collection of unprocessed and processed [`AssetReader`](crate::io::AssetReader), [`AssetWriter`](crate::io::AssetWriter), and [`AssetWatcher`] instances
414
336
/// for a specific asset source, identified by an [`AssetSourceId`].
0 commit comments