removed unused Pre- / PostRead aspects
This commit is contained in:
parent
8ed1ad6785
commit
797a707c8e
2 changed files with 0 additions and 20 deletions
|
@ -1,7 +1,5 @@
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum HookPosition {
|
pub enum HookPosition {
|
||||||
PreRead,
|
|
||||||
PostRead,
|
|
||||||
PreCreate,
|
PreCreate,
|
||||||
PostCreate,
|
PostCreate,
|
||||||
PreRetrieve,
|
PreRetrieve,
|
||||||
|
|
|
@ -111,8 +111,6 @@ pub struct Store {
|
||||||
* Registered hooks
|
* Registered hooks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pre_read_aspects : Arc<Mutex<Vec<Aspect>>>,
|
|
||||||
post_read_aspects : Arc<Mutex<Vec<Aspect>>>,
|
|
||||||
pre_create_aspects : Arc<Mutex<Vec<Aspect>>>,
|
pre_create_aspects : Arc<Mutex<Vec<Aspect>>>,
|
||||||
post_create_aspects : Arc<Mutex<Vec<Aspect>>>,
|
post_create_aspects : Arc<Mutex<Vec<Aspect>>>,
|
||||||
pre_retrieve_aspects : Arc<Mutex<Vec<Aspect>>>,
|
pre_retrieve_aspects : Arc<Mutex<Vec<Aspect>>>,
|
||||||
|
@ -160,18 +158,6 @@ impl Store {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let pre_read_aspects = get_pre_read_aspect_names(&store_config)
|
|
||||||
.into_iter().map(|n| {
|
|
||||||
let cfg = AspectConfig::get_for(&store_config, n.clone());
|
|
||||||
Aspect::new(n, cfg)
|
|
||||||
}).collect();
|
|
||||||
|
|
||||||
let post_read_aspects = get_post_read_aspect_names(&store_config)
|
|
||||||
.into_iter().map(|n| {
|
|
||||||
let cfg = AspectConfig::get_for(&store_config, n.clone());
|
|
||||||
Aspect::new(n, cfg)
|
|
||||||
}).collect();
|
|
||||||
|
|
||||||
let pre_create_aspects = get_pre_create_aspect_names(&store_config)
|
let pre_create_aspects = get_pre_create_aspect_names(&store_config)
|
||||||
.into_iter().map(|n| {
|
.into_iter().map(|n| {
|
||||||
let cfg = AspectConfig::get_for(&store_config, n.clone());
|
let cfg = AspectConfig::get_for(&store_config, n.clone());
|
||||||
|
@ -223,8 +209,6 @@ impl Store {
|
||||||
let store = Store {
|
let store = Store {
|
||||||
location: location,
|
location: location,
|
||||||
configuration: store_config,
|
configuration: store_config,
|
||||||
pre_read_aspects : Arc::new(Mutex::new(pre_read_aspects)),
|
|
||||||
post_read_aspects : Arc::new(Mutex::new(post_read_aspects)),
|
|
||||||
pre_create_aspects : Arc::new(Mutex::new(pre_create_aspects)),
|
pre_create_aspects : Arc::new(Mutex::new(pre_create_aspects)),
|
||||||
post_create_aspects : Arc::new(Mutex::new(post_create_aspects)),
|
post_create_aspects : Arc::new(Mutex::new(post_create_aspects)),
|
||||||
pre_retrieve_aspects : Arc::new(Mutex::new(pre_retrieve_aspects)),
|
pre_retrieve_aspects : Arc::new(Mutex::new(pre_retrieve_aspects)),
|
||||||
|
@ -421,8 +405,6 @@ impl Store {
|
||||||
debug!(" with aspect: {:?}", aspect_name);
|
debug!(" with aspect: {:?}", aspect_name);
|
||||||
|
|
||||||
let guard = match position {
|
let guard = match position {
|
||||||
HookPosition::PreRead => self.pre_read_aspects.clone(),
|
|
||||||
HookPosition::PostRead => self.post_read_aspects.clone(),
|
|
||||||
HookPosition::PreCreate => self.pre_create_aspects.clone(),
|
HookPosition::PreCreate => self.pre_create_aspects.clone(),
|
||||||
HookPosition::PostCreate => self.post_create_aspects.clone(),
|
HookPosition::PostCreate => self.post_create_aspects.clone(),
|
||||||
HookPosition::PreRetrieve => self.pre_retrieve_aspects.clone(),
|
HookPosition::PreRetrieve => self.pre_retrieve_aspects.clone(),
|
||||||
|
|
Loading…
Reference in a new issue