rearrange configuration to be closer to where it's consumed

This commit is contained in:
2025-10-11 14:11:31 -07:00
parent 77126e40ae
commit 449eb85ab8
10 changed files with 92 additions and 93 deletions

View File

@@ -1,11 +1,10 @@
use crate::config::{ActionDeclaration, EntryDeclaration};
use crate::actions::ActionDeclaration;
use std::collections::{BTreeMap, BTreeSet};
use std::rc::Rc;
#[derive(Default)]
pub struct RootContext {
actions: BTreeMap<String, ActionDeclaration>,
entries: BTreeMap<String, (Rc<Context>, EntryDeclaration)>,
}
impl RootContext {
@@ -20,14 +19,6 @@ impl RootContext {
pub fn actions_mut(&mut self) -> &mut BTreeMap<String, ActionDeclaration> {
&mut self.actions
}
pub fn entries(&self) -> &BTreeMap<String, (Rc<Context>, EntryDeclaration)> {
&self.entries
}
pub fn entries_mut(&mut self) -> &mut BTreeMap<String, (Rc<Context>, EntryDeclaration)> {
&mut self.entries
}
}
pub struct Context {