compiled without error, needs fix for warnings and testing
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user