Skip to content

Commit 985059a

Browse files
committed
Don't make StoreState public
1 parent 5f2de5e commit 985059a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

plugins/store/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn main() {
123123
.plugin(tauri_plugin_store::Builder::default().build())
124124
.setup(|app| {
125125
// This loads the store from disk
126-
let store = app.store("app_data.json");
126+
let store = app.store("app_data.json")?;
127127

128128
// Note that values must be serde_json::Value instances,
129129
// otherwise, they will not be compatible with the JavaScript bindings.

plugins/store/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct ChangePayload<'a> {
4141
}
4242

4343
#[derive(Debug)]
44-
pub struct StoreState {
44+
struct StoreState {
4545
stores: Arc<Mutex<HashMap<PathBuf, ResourceId>>>,
4646
serialize_fns: HashMap<String, SerializeFn>,
4747
deserialize_fns: HashMap<String, DeserializeFn>,
@@ -327,7 +327,6 @@ pub trait StoreExt<R: Runtime> {
327327

328328
impl<R: Runtime, T: Manager<R>> StoreExt<R> for T {
329329
fn store(&self, path: impl AsRef<Path>) -> Result<Arc<Store<R>>> {
330-
let path = path.as_ref();
331330
StoreBuilder::new(self.app_handle(), path).new_or_existing()
332331
}
333332

0 commit comments

Comments
 (0)