diff options
| author | Kevin Hoerr <kjhoerr@submelon.dev> | 2026-05-05 10:59:23 -0400 |
|---|---|---|
| committer | Kevin Hoerr <kjhoerr@submelon.dev> | 2026-05-05 10:59:23 -0400 |
| commit | 149be73577e1f717958c77ed6b2bd298bda3aec3 (patch) | |
| tree | 00f3b45f97fc8e66e8bbaacf80c5f0698336ab50 /src/app/mod.rs | |
| parent | 88822208c54b0d53267fe26d7e7440265acd23ac (diff) | |
| download | equity-tracker-149be73577e1f717958c77ed6b2bd298bda3aec3.tar.gz equity-tracker-149be73577e1f717958c77ed6b2bd298bda3aec3.tar.bz2 equity-tracker-149be73577e1f717958c77ed6b2bd298bda3aec3.zip | |
app/mod.rs: Use AppContext init_context for initializing the store
Diffstat (limited to 'src/app/mod.rs')
| -rw-r--r-- | src/app/mod.rs | 5 |
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; |
