feat(config): make config store trait Send

This commit is contained in:
Federico Terzi 2021-04-23 21:52:02 +02:00
parent 03d2aac56e
commit 83a58c9912
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ mod resolve;
mod util; mod util;
pub(crate) mod store; pub(crate) mod store;
pub trait Config { pub trait Config: Send {
fn id(&self) -> i32; fn id(&self) -> i32;
fn label(&self) -> &str; fn label(&self) -> &str;
fn match_paths(&self) -> &[String]; fn match_paths(&self) -> &[String];
@ -36,7 +36,7 @@ pub trait Config {
fn is_match(&self, app: &AppProperties) -> bool; fn is_match(&self, app: &AppProperties) -> bool;
} }
pub trait ConfigStore { pub trait ConfigStore: Send {
fn default(&self) -> &dyn Config; fn default(&self) -> &dyn Config;
fn active<'a>(&'a self, app: &AppProperties) -> &'a dyn Config; fn active<'a>(&'a self, app: &AppProperties) -> &'a dyn Config;
fn configs(&self) -> Vec<&dyn Config>; fn configs(&self) -> Vec<&dyn Config>;

View File

@ -21,7 +21,7 @@ use super::{Match, Variable};
mod default; mod default;
pub trait MatchStore { pub trait MatchStore: Send {
fn query(&self, paths: &[String]) -> MatchSet; fn query(&self, paths: &[String]) -> MatchSet;
} }