From 149be73577e1f717958c77ed6b2bd298bda3aec3 Mon Sep 17 00:00:00 2001 From: Kevin Hoerr Date: Tue, 5 May 2026 10:59:23 -0400 Subject: app/mod.rs: Use AppContext init_context for initializing the store --- src/app/mod.rs | 5 ++--- 1 file 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; -- cgit v1.3