mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-29 12:06:01 +02:00
try get first
This commit is contained in:
@@ -177,8 +177,8 @@ pub trait StoreExt<R: Runtime> {
|
||||
|
||||
impl<R: Runtime, T: Manager<R>> StoreExt<R> for T {
|
||||
fn store(&self, path: impl AsRef<Path>) -> Arc<Store<R>> {
|
||||
self.create_store(&path)
|
||||
.unwrap_or_else(|_| self.get_store(path).unwrap())
|
||||
self.get_store(&path)
|
||||
.unwrap_or_else(|| self.create_store(&path).unwrap())
|
||||
}
|
||||
|
||||
fn create_store(&self, path: impl AsRef<Path>) -> Result<Arc<Store<R>>> {
|
||||
|
||||
Reference in New Issue
Block a user