fix(store): with_store and StoreCollection become private in #1011 (#1040)

* Fix with_store become private in #1011

* Add change file
This commit is contained in:
Tony
2024-03-07 18:52:33 +08:00
committed by GitHub
parent 5006717a7f
commit 79691e93e0
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'store': patch
---
Fix `with_store` and `StoreCollection` changed to private in #1011
+2 -2
View File
@@ -48,7 +48,7 @@ struct ChangePayload<'a> {
value: &'a JsonValue,
}
struct StoreCollection<R: Runtime> {
pub struct StoreCollection<R: Runtime> {
stores: Mutex<HashMap<PathBuf, Store<R>>>,
frozen: bool,
@@ -56,7 +56,7 @@ struct StoreCollection<R: Runtime> {
mobile_plugin_handle: PluginHandle<R>,
}
fn with_store<R: Runtime, T, F: FnOnce(&mut Store<R>) -> Result<T>>(
pub fn with_store<R: Runtime, T, F: FnOnce(&mut Store<R>) -> Result<T>>(
app: AppHandle<R>,
collection: State<'_, StoreCollection<R>>,
path: impl AsRef<Path>,