Skip to content

Commit

Permalink
fix: simplify error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-pitblado committed Nov 11, 2024
1 parent 8769306 commit 8e219ba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ impl App {
.await
{
eprintln!("Error creating new task: {}", err);
} else {
if let Err(err) = self.refresh_tasks(instance_url, api_key).await {
eprintln!("Error fetching tasks: {}", err);
}
} else if let Err(err) = self.refresh_tasks(instance_url, api_key).await {
eprintln!("Error fetching tasks: {}", err);
}
self.new_task_title.clear();
self.new_task_description.clear();
Expand Down

0 comments on commit 8e219ba

Please sign in to comment.