feat: with async commands instead of inline mutations phew.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -24,17 +24,23 @@ impl State {
|
||||
let engine = storage.load()?;
|
||||
let events = Events::default();
|
||||
let engine = SharedEngine::from(engine);
|
||||
|
||||
let querier = match backend {
|
||||
Backend::Local => Querier::local(&engine),
|
||||
Backend::Remote => Querier::remote().await?,
|
||||
};
|
||||
|
||||
let commander = match backend {
|
||||
Backend::Local => Commander::local(engine.clone(), storage.clone(), events.clone())?,
|
||||
Backend::Remote => todo!(),
|
||||
};
|
||||
|
||||
Ok(Self {
|
||||
engine: engine.clone(),
|
||||
storage: storage.clone(),
|
||||
events: events.clone(),
|
||||
|
||||
commander: Commander::new(engine.clone(), storage, events)?,
|
||||
commander,
|
||||
querier,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user