diff --git a/client/src/functions/modes/edit/add_table_e.rs b/client/src/functions/modes/edit/add_table_e.rs index 66e26a7..17aa3dc 100644 --- a/client/src/functions/modes/edit/add_table_e.rs +++ b/client/src/functions/modes/edit/add_table_e.rs @@ -2,7 +2,7 @@ use crate::state::pages::add_table::AddTableState; use crate::state::pages::canvas_state::CanvasState; // Use trait use crossterm::event::{KeyCode, KeyEvent}; -use anyhow::{Context, Result}; +use anyhow::Result; #[derive(PartialEq)] enum CharType { diff --git a/client/src/functions/modes/edit/auth_e.rs b/client/src/functions/modes/edit/auth_e.rs index 8bb0fbd..7c0d0ff 100644 --- a/client/src/functions/modes/edit/auth_e.rs +++ b/client/src/functions/modes/edit/auth_e.rs @@ -7,7 +7,7 @@ use crate::state::pages::auth::RegisterState; use crate::tui::functions::common::form::{revert, save}; use crossterm::event::{KeyCode, KeyEvent}; use std::any::Any; -use anyhow::{Context, Result}; +use anyhow::Result; pub async fn execute_common_action( action: &str, diff --git a/client/src/functions/modes/edit/form_e.rs b/client/src/functions/modes/edit/form_e.rs index fd62430..6c634c5 100644 --- a/client/src/functions/modes/edit/form_e.rs +++ b/client/src/functions/modes/edit/form_e.rs @@ -8,7 +8,7 @@ use crate::tui::functions::common::form::SaveOutcome; use crate::modes::handlers::event::EventOutcome; use crossterm::event::{KeyCode, KeyEvent}; use std::any::Any; -use anyhow::{Context, Result}; +use anyhow::Result; pub async fn execute_common_action( action: &str, diff --git a/client/src/functions/modes/read_only/auth_ro.rs b/client/src/functions/modes/read_only/auth_ro.rs index a146be8..29997f1 100644 --- a/client/src/functions/modes/read_only/auth_ro.rs +++ b/client/src/functions/modes/read_only/auth_ro.rs @@ -3,7 +3,7 @@ use crate::config::binds::key_sequences::KeySequenceTracker; use crate::state::pages::canvas_state::CanvasState; use crate::state::app::state::AppState; -use anyhow::{Context, Result}; +use anyhow::Result; #[derive(PartialEq)] enum CharType { diff --git a/client/src/main.rs b/client/src/main.rs index a61f4a2..e7b9842 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -1,7 +1,7 @@ // client/src/main.rs use client::run_ui; use dotenvy::dotenv; -use anyhow::{anyhow, Result}; +use anyhow::Result; #[tokio::main] async fn main() -> Result<()> { diff --git a/client/src/modes/canvas/read_only.rs b/client/src/modes/canvas/read_only.rs index 8dd2b73..8b9638e 100644 --- a/client/src/modes/canvas/read_only.rs +++ b/client/src/modes/canvas/read_only.rs @@ -10,7 +10,7 @@ use crate::state::pages::add_table::AddTableState; use crate::state::app::state::AppState; use crate::functions::modes::read_only::{auth_ro, form_ro, add_table_ro}; use crossterm::event::KeyEvent; -use anyhow::{Context, Result}; +use anyhow::Result; pub async fn handle_read_only_event( app_state: &mut AppState, diff --git a/client/src/modes/common/command_mode.rs b/client/src/modes/common/command_mode.rs index 6645554..6cf0a5d 100644 --- a/client/src/modes/common/command_mode.rs +++ b/client/src/modes/common/command_mode.rs @@ -10,7 +10,7 @@ use crate::tui::terminal::core::TerminalCore; use crate::tui::functions::common::form::{save, revert}; use crate::modes::handlers::event::EventOutcome; use crate::tui::functions::common::form::SaveOutcome; -use anyhow::{Context, Result}; +use anyhow::Result; pub async fn handle_command_event( key: KeyEvent, diff --git a/client/src/modes/common/commands.rs b/client/src/modes/common/commands.rs index 2504c18..9a623e2 100644 --- a/client/src/modes/common/commands.rs +++ b/client/src/modes/common/commands.rs @@ -3,7 +3,7 @@ use crate::tui::terminal::core::TerminalCore; use crate::state::app::state::AppState; use crate::state::pages::{form::FormState, auth::LoginState, auth::RegisterState}; use crate::state::pages::canvas_state::CanvasState; -use anyhow::{Context, Result}; +use anyhow::Result; pub struct CommandHandler; diff --git a/client/src/modes/general/dialog.rs b/client/src/modes/general/dialog.rs index 31a0063..82d47e5 100644 --- a/client/src/modes/general/dialog.rs +++ b/client/src/modes/general/dialog.rs @@ -10,7 +10,7 @@ use crate::state::pages::admin::AdminState; use crate::modes::handlers::event::EventOutcome; use crate::tui::functions::common::{login, register}; use crate::tui::functions::common::add_table::handle_delete_selected_columns; -use anyhow::{Context, Result}; +use anyhow::Result; /// Handles key events specifically when a dialog is active. /// Returns Some(Result) if the event was handled (consumed), diff --git a/client/src/modes/general/navigation.rs b/client/src/modes/general/navigation.rs index cf9a67b..607f5ff 100644 --- a/client/src/modes/general/navigation.rs +++ b/client/src/modes/general/navigation.rs @@ -11,7 +11,7 @@ use crate::state::pages::admin::AdminState; use crate::state::pages::canvas_state::CanvasState; use crate::ui::handlers::context::UiContext; use crate::modes::handlers::event::EventOutcome; -use anyhow::{Context, Result}; +use anyhow::Result; pub async fn handle_navigation_event( key: KeyEvent, diff --git a/client/src/modes/highlight/highlight.rs b/client/src/modes/highlight/highlight.rs index 00e66b1..103a326 100644 --- a/client/src/modes/highlight/highlight.rs +++ b/client/src/modes/highlight/highlight.rs @@ -11,7 +11,7 @@ use crate::state::pages::form::FormState; use crate::modes::handlers::event::EventOutcome; use crate::modes::read_only; use crossterm::event::KeyEvent; -use anyhow::{anyhow, Result}; +use anyhow::Result; /// Handles events when in Highlight mode. /// Currently, it mostly delegates to the read_only handler for movement. diff --git a/client/src/services/grpc_client.rs b/client/src/services/grpc_client.rs index ec9cf9e..5bb994a 100644 --- a/client/src/services/grpc_client.rs +++ b/client/src/services/grpc_client.rs @@ -10,7 +10,7 @@ use common::proto::multieko2::table_definition::{ table_definition_client::TableDefinitionClient, ProfileTreeResponse }; -use anyhow::{Context, Result}; +use anyhow::Result; #[derive(Clone)] pub struct GrpcClient { diff --git a/client/src/state/app/state.rs b/client/src/state/app/state.rs index d736804..c7e2422 100644 --- a/client/src/state/app/state.rs +++ b/client/src/state/app/state.rs @@ -4,7 +4,7 @@ use std::env; use common::proto::multieko2::table_definition::ProfileTreeResponse; use crate::modes::handlers::mode_manager::AppMode; use crate::ui::handlers::context::DialogPurpose; -use anyhow::{Context, Result}; +use anyhow::Result; pub struct DialogState { pub dialog_show: bool, diff --git a/client/src/tui/functions/common/form.rs b/client/src/tui/functions/common/form.rs index 44440f2..2ff2d37 100644 --- a/client/src/tui/functions/common/form.rs +++ b/client/src/tui/functions/common/form.rs @@ -3,7 +3,7 @@ use crate::services::grpc_client::GrpcClient; use crate::state::pages::form::FormState; use common::proto::multieko2::adresar::{PostAdresarRequest, PutAdresarRequest}; -use anyhow::{Context, Result}; +use anyhow::Result; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum SaveOutcome { diff --git a/client/src/tui/functions/common/login.rs b/client/src/tui/functions/common/login.rs index fd8fbf9..1719137 100644 --- a/client/src/tui/functions/common/login.rs +++ b/client/src/tui/functions/common/login.rs @@ -7,7 +7,6 @@ use crate::state::app::state::AppState; use crate::state::app::buffer::{AppView, BufferState}; use crate::state::pages::canvas_state::CanvasState; use crate::ui::handlers::context::DialogPurpose; -use crate::modes::handlers::event::EventOutcome; use common::proto::multieko2::auth::LoginResponse; use anyhow::{Context, Result}; diff --git a/client/src/tui/functions/common/register.rs b/client/src/tui/functions/common/register.rs index 2c1c3e0..49d558a 100644 --- a/client/src/tui/functions/common/register.rs +++ b/client/src/tui/functions/common/register.rs @@ -8,7 +8,7 @@ use crate::state::{ }; use crate::ui::handlers::context::DialogPurpose; use crate::state::app::buffer::{AppView, BufferState}; -use anyhow::{Context, Result}; +use anyhow::Result; /// Attempts to register the user using the provided details via gRPC. /// Updates RegisterState and AppState on success or failure. diff --git a/client/src/tui/terminal/core.rs b/client/src/tui/terminal/core.rs index e7c5ee0..599a2f2 100644 --- a/client/src/tui/terminal/core.rs +++ b/client/src/tui/terminal/core.rs @@ -7,7 +7,7 @@ use crossterm::{ }; use ratatui::{backend::CrosstermBackend, Terminal}; use std::io::{self, stdout, Write}; -use anyhow::{Context, Result}; +use anyhow::Result; pub struct TerminalCore { terminal: Terminal>, diff --git a/client/src/tui/terminal/event_reader.rs b/client/src/tui/terminal/event_reader.rs index 22c5bef..6e6c676 100644 --- a/client/src/tui/terminal/event_reader.rs +++ b/client/src/tui/terminal/event_reader.rs @@ -1,7 +1,7 @@ // src/tui/terminal/event_reader.rs use crossterm::event::{self, Event}; -use anyhow::{Context, Result}; +use anyhow::Result; pub struct EventReader; diff --git a/client/src/ui/handlers/ui.rs b/client/src/ui/handlers/ui.rs index 0fb0faf..ad8a984 100644 --- a/client/src/ui/handlers/ui.rs +++ b/client/src/ui/handlers/ui.rs @@ -3,7 +3,7 @@ use crate::config::binds::config::Config; use crate::config::colors::themes::Theme; use crate::services::grpc_client::GrpcClient; -use crate::services::auth::AuthClient; // <-- Add AuthClient import + // <-- Add AuthClient import use crate::services::ui_service::UiService; use crate::modes::common::commands::CommandHandler; use crate::modes::handlers::event::{EventHandler, EventOutcome};