compiled without error, needs fix for warnings and testing

This commit is contained in:
filipriec
2025-03-21 14:05:39 +01:00
parent 15d87e33e5
commit 8dfec29202
3 changed files with 7 additions and 7 deletions

View File

@@ -4,19 +4,19 @@ use crate::tui::terminal::core::TerminalCore;
use crate::tui::terminal::grpc_client::GrpcClient;
pub struct CommandHandler {
grpc_client: GrpcClient,
is_saved: bool,
}
impl CommandHandler {
pub fn new(grpc_client: GrpcClient) -> Self {
Self { grpc_client, is_saved: false }
pub fn new() -> Self {
Self { is_saved: false }
}
pub async fn handle_command(
&mut self,
action: &str,
terminal: &mut TerminalCore
terminal: &mut TerminalCore,
grpc_client: &mut GrpcClient,
) -> Result<(bool, String), Box<dyn std::error::Error>> {
match action {
"quit" => self.handle_quit(terminal).await,