From 10e9c3ead062d9274f972882dc914e63a0426221 Mon Sep 17 00:00:00 2001 From: filipriec Date: Mon, 7 Apr 2025 21:32:02 +0200 Subject: [PATCH] minor changes --- client/src/modes/common/command_mode.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/client/src/modes/common/command_mode.rs b/client/src/modes/common/command_mode.rs index ca5a609..7f6ac97 100644 --- a/client/src/modes/common/command_mode.rs +++ b/client/src/modes/common/command_mode.rs @@ -9,12 +9,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; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum CommandOutcome { - ExitCommandMode(String), - // Other command-specific outcomes if needed -} +use std::error::Error; pub async fn handle_command_event( key: KeyEvent, @@ -27,7 +22,7 @@ pub async fn handle_command_event( terminal: &mut TerminalCore, current_position: &mut u64, total_count: u64, -) -> Result> { +) -> Result> { // Exit command mode (via configurable keybinding) if config.is_exit_command_mode(key.code, key.modifiers) { command_input.clear(); @@ -79,7 +74,7 @@ async fn process_command( terminal: &mut TerminalCore, current_position: &mut u64, total_count: u64, -) -> Result> { +) -> Result> { // Clone the trimmed command to avoid borrow issues let command = command_input.trim().to_string(); if command.is_empty() {