diff options
| author | Kevin Hoerr <kjhoerr@submelon.dev> | 2026-04-16 11:37:21 -0400 |
|---|---|---|
| committer | Kevin Hoerr <kjhoerr@submelon.dev> | 2026-04-16 11:37:21 -0400 |
| commit | 615d44041d35ee1a08ddc66423f67a9d48f53ae9 (patch) | |
| tree | 9720d6a192e0bae9c7393b8b99ff8ae401ec7f72 /src | |
| parent | 51623bc995c29937bb0a13d5b71ff908be8d1a1c (diff) | |
| download | equity-tracker-615d44041d35ee1a08ddc66423f67a9d48f53ae9.tar.gz equity-tracker-615d44041d35ee1a08ddc66423f67a9d48f53ae9.tar.bz2 equity-tracker-615d44041d35ee1a08ddc66423f67a9d48f53ae9.zip | |
Switch to distrobox as base for development
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/mod.rs (renamed from src/main/rust/app.rs) | 8 | ||||
| -rw-r--r-- | src/app/store/mod.rs (renamed from src/main/rust/store/mod.rs) | 2 | ||||
| -rw-r--r-- | src/app/store/sqlite.rs (renamed from src/main/rust/store/sqlite.rs) | 2 | ||||
| -rw-r--r-- | src/db/20251114-0-init-schema.sql (renamed from src/main/resources/db/20251114-0-init-schema.sql) | 0 | ||||
| -rw-r--r-- | src/db/20251117-0-summary-view.sql (renamed from src/main/resources/db/20251117-0-summary-view.sql) | 0 | ||||
| -rw-r--r-- | src/main.rs (renamed from src/main/rust/main.rs) | 1 | ||||
| -rw-r--r-- | src/ui.rs (renamed from src/main/rust/ui.rs) | 0 |
7 files changed, 8 insertions, 5 deletions
diff --git a/src/main/rust/app.rs b/src/app/mod.rs index 2ed7c28..6003640 100644 --- a/src/main/rust/app.rs +++ b/src/app/mod.rs @@ -1,4 +1,6 @@ -use crate::store::{Context, Store}; +mod store; + +use store::{Context, Store}; use miette::{Diagnostic, ErrReport, Result}; use thiserror::Error; @@ -18,6 +20,7 @@ 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(); @@ -82,6 +85,7 @@ impl App { &self.error } + /// Clears any existing input error in the app state pub fn clear_error(&mut self) -> Result<()> { self.error = None; Ok(()) @@ -91,7 +95,7 @@ impl App { #[cfg(test)] mod tests { use super::*; - use crate::store::ContextError; + use store::ContextError; fn get_count(app: &App) -> Result<u8, ContextError> { app.context.get_store().get_counter() diff --git a/src/main/rust/store/mod.rs b/src/app/store/mod.rs index 2cce3e9..d038167 100644 --- a/src/main/rust/store/mod.rs +++ b/src/app/store/mod.rs @@ -1,6 +1,6 @@ mod sqlite; -use crate::store::sqlite::SQLiteStore; +use sqlite::{SQLiteStore}; use miette::{Diagnostic, Result}; use thiserror::Error; diff --git a/src/main/rust/store/sqlite.rs b/src/app/store/sqlite.rs index 6647556..4f5f8f2 100644 --- a/src/main/rust/store/sqlite.rs +++ b/src/app/store/sqlite.rs @@ -1,4 +1,4 @@ -use crate::store::{ContextError, Store}; +use super::{ContextError, Store}; use miette::Result; use sqlite::Connection; diff --git a/src/main/resources/db/20251114-0-init-schema.sql b/src/db/20251114-0-init-schema.sql index 886a961..886a961 100644 --- a/src/main/resources/db/20251114-0-init-schema.sql +++ b/src/db/20251114-0-init-schema.sql diff --git a/src/main/resources/db/20251117-0-summary-view.sql b/src/db/20251117-0-summary-view.sql index a4e8004..a4e8004 100644 --- a/src/main/resources/db/20251117-0-summary-view.sql +++ b/src/db/20251117-0-summary-view.sql diff --git a/src/main/rust/main.rs b/src/main.rs index 124ce81..bb63c86 100644 --- a/src/main/rust/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ mod app; -pub mod store; mod ui; use app::App; diff --git a/src/main/rust/ui.rs b/src/ui.rs index 1632623..1632623 100644 --- a/src/main/rust/ui.rs +++ b/src/ui.rs |
