From 79691e93e04b820e44dce1c7d91b8865fa6ccb14 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Thu, 7 Mar 2024 18:52:33 +0800 Subject: [PATCH] fix(store): `with_store` and `StoreCollection` become private in #1011 (#1040) * Fix with_store become private in #1011 * Add change file --- .changes/public-with-store.md | 5 +++++ plugins/store/src/lib.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/public-with-store.md diff --git a/.changes/public-with-store.md b/.changes/public-with-store.md new file mode 100644 index 00000000..33dc15bb --- /dev/null +++ b/.changes/public-with-store.md @@ -0,0 +1,5 @@ +--- +'store': patch +--- + +Fix `with_store` and `StoreCollection` changed to private in #1011 diff --git a/plugins/store/src/lib.rs b/plugins/store/src/lib.rs index 700b058e..2b923fde 100644 --- a/plugins/store/src/lib.rs +++ b/plugins/store/src/lib.rs @@ -48,7 +48,7 @@ struct ChangePayload<'a> { value: &'a JsonValue, } -struct StoreCollection { +pub struct StoreCollection { stores: Mutex>>, frozen: bool, @@ -56,7 +56,7 @@ struct StoreCollection { mobile_plugin_handle: PluginHandle, } -fn with_store) -> Result>( +pub fn with_store) -> Result>( app: AppHandle, collection: State<'_, StoreCollection>, path: impl AsRef,