aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs
index 299f82e..6b631af 100644
--- a/src/app/mod.rs
+++ b/src/app/mod.rs
@@ -2,7 +2,7 @@ mod ledger;
mod store;
use miette::{Diagnostic, ErrReport, Result};
-use store::{AppContext, Store};
+use store::AppContext;
use thiserror::Error;
#[derive(Debug, Default, PartialEq)]
@@ -46,9 +46,8 @@ pub struct OverflowError {
impl App {
/// Build context in App and pass it forward
pub fn init_context(&mut self) -> Result<&mut Self> {
- let store = self.context.unwrap_store();
+ self.context.init_context()?;
- store.init()?;
self.counter = Some(0_u8);
self.mode = AppMode::Counter;