From d1a6e2f33326161a78a9a72bd9320dcb1b1f9710 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sun, 18 Jun 2023 16:57:36 -0700 Subject: [PATCH] chore(deps): update state to 0.6 (#7252) --- .changes/state-0.6.md | 5 +++++ core/tauri/Cargo.toml | 2 +- core/tauri/src/state.rs | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changes/state-0.6.md diff --git a/.changes/state-0.6.md b/.changes/state-0.6.md new file mode 100644 index 000000000000..7efc9c0f0c88 --- /dev/null +++ b/.changes/state-0.6.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:deps +--- + +Update `state` to v0.6. diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 48f106c90570..9eb70daf4170 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -54,7 +54,7 @@ tauri-runtime-wry = { version = "0.13.0-alpha.6", path = "../tauri-runtime-wry", rand = "0.8" semver = { version = "1.0", features = [ "serde" ] } serde_repr = "0.1" -state = "0.5" +state = "0.6" tempfile = "3" http = "0.2" dirs-next = "2.0" diff --git a/core/tauri/src/state.rs b/core/tauri/src/state.rs index b13f0c0f3f4a..03d74679b29c 100644 --- a/core/tauri/src/state.rs +++ b/core/tauri/src/state.rs @@ -6,7 +6,7 @@ use crate::{ command::{CommandArg, CommandItem}, InvokeError, Runtime, }; -use state::Container; +use state::TypeMap; /// A guard for a state value. /// @@ -58,11 +58,11 @@ impl<'r, 'de: 'r, T: Send + Sync + 'static, R: Runtime> CommandArg<'de, R> for S /// The Tauri state manager. #[derive(Debug)] -pub struct StateManager(pub(crate) Container![Send + Sync]); +pub struct StateManager(pub(crate) TypeMap![Send + Sync]); impl StateManager { pub(crate) fn new() -> Self { - Self(::new()) + Self(::new()) } pub(crate) fn set(&self, state: T) -> bool {