aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Hoerr <kjhoerr@submelon.dev>2026-03-02 23:10:20 +0000
committerKevin Hoerr <kjhoerr@submelon.dev>2026-03-02 23:10:20 +0000
commit51623bc995c29937bb0a13d5b71ff908be8d1a1c (patch)
treea29aff27ac31b0795209292f28f9bc9350074adf /src
parent5f3c0ec0f4c765d8cf75761d0af903072fd06a02 (diff)
downloadequity-tracker-51623bc995c29937bb0a13d5b71ff908be8d1a1c.tar.gz
equity-tracker-51623bc995c29937bb0a13d5b71ff908be8d1a1c.tar.bz2
equity-tracker-51623bc995c29937bb0a13d5b71ff908be8d1a1c.zip
main.rs: Use miette macro to shadow UI fatal error
Diffstat (limited to 'src')
-rw-r--r--src/main/rust/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/rust/main.rs b/src/main/rust/main.rs
index dad7f7c..124ce81 100644
--- a/src/main/rust/main.rs
+++ b/src/main/rust/main.rs
@@ -3,7 +3,7 @@ pub mod store;
mod ui;
use app::App;
-use miette::{IntoDiagnostic, Result};
+use miette::{IntoDiagnostic, Result, miette};
use ratatui::{Terminal, backend::Backend};
use ratatui::crossterm::{
@@ -48,8 +48,7 @@ fn main() -> Result<()> {
fn run_app<B: Backend>(term: &mut Terminal<B>, app: &mut App) -> Result<()> {
while !app.get_exit_status() {
term.draw(|frame| ui::draw(frame, app))
- .map_err(|_| std::io::Error::new(std::io::ErrorKind::Other, "idk"))
- .into_diagnostic()?;
+ .map_err(|_| miette!("Unrecoverable error occurred"))?;
match event::read().into_diagnostic()? {
// it's important to check that the event is a key press event as