Remove load

pull/1860/head
Tony 8 months ago
parent a7af6612f2
commit fbc7149d60
No known key found for this signature in database
GPG Key ID: 34BDD3EA27824956

@ -172,7 +172,6 @@ impl<R: Runtime> StoreBuilder<R> {
pub(crate) fn build_inner(
mut self,
load: bool,
mut stores: MutexGuard<'_, HashMap<PathBuf, ResourceId>>,
) -> crate::Result<(Arc<Store<R>>, ResourceId)> {
if stores.contains_key(&self.path) {
@ -229,7 +228,7 @@ impl<R: Runtime> StoreBuilder<R> {
pub(crate) fn create_inner(self) -> crate::Result<(Arc<Store<R>>, ResourceId)> {
let stores = self.app.state::<StoreState>().stores.clone();
self.build_inner(false, stores.lock().unwrap())
self.build_inner(stores.lock().unwrap())
}
/// Get the existing store with the same path or creates a new [`Store`].
@ -259,7 +258,7 @@ impl<R: Runtime> StoreBuilder<R> {
return Ok((self.app.resources_table().get(*rid).unwrap(), *rid));
}
self.build_inner(true, stores_)
self.build_inner(stores_)
}
}

Loading…
Cancel
Save