From 83a58c991244ac26c1c0b47764fa231f795987fa Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Fri, 23 Apr 2021 21:52:02 +0200 Subject: [PATCH] feat(config): make config store trait Send --- espanso-config/src/config/mod.rs | 4 ++-- espanso-config/src/matches/store/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/espanso-config/src/config/mod.rs b/espanso-config/src/config/mod.rs index f861e4d..13e957d 100644 --- a/espanso-config/src/config/mod.rs +++ b/espanso-config/src/config/mod.rs @@ -27,7 +27,7 @@ mod resolve; mod util; pub(crate) mod store; -pub trait Config { +pub trait Config: Send { fn id(&self) -> i32; fn label(&self) -> &str; fn match_paths(&self) -> &[String]; @@ -36,7 +36,7 @@ pub trait Config { fn is_match(&self, app: &AppProperties) -> bool; } -pub trait ConfigStore { +pub trait ConfigStore: Send { fn default(&self) -> &dyn Config; fn active<'a>(&'a self, app: &AppProperties) -> &'a dyn Config; fn configs(&self) -> Vec<&dyn Config>; diff --git a/espanso-config/src/matches/store/mod.rs b/espanso-config/src/matches/store/mod.rs index edeee9e..94580ea 100644 --- a/espanso-config/src/matches/store/mod.rs +++ b/espanso-config/src/matches/store/mod.rs @@ -21,7 +21,7 @@ use super::{Match, Variable}; mod default; -pub trait MatchStore { +pub trait MatchStore: Send { fn query(&self, paths: &[String]) -> MatchSet; }