Skip to content

Commit

Permalink
chore(deps): update state to 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jun 18, 2023
1 parent 7036bc9 commit dd9ac94
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/state-0.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:deps
---

Update `state` to v0.6.
2 changes: 1 addition & 1 deletion core/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions core/tauri/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
command::{CommandArg, CommandItem},
InvokeError, Runtime,
};
use state::Container;
use state::TypeMap;

/// A guard for a state value.
///
Expand Down Expand Up @@ -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(<Container![Send + Sync]>::new())
Self(<TypeMap![Send + Sync]>::new())
}

pub(crate) fn set<T: Send + Sync + 'static>(&self, state: T) -> bool {
Expand Down

0 comments on commit dd9ac94

Please sign in to comment.