fixing warnings
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
// src/modes/handlers/common.rs
|
||||
|
||||
use crate::tui::terminal::{
|
||||
core::TerminalCore,
|
||||
grpc_client::GrpcClient,
|
||||
};
|
||||
use crate::tui::terminal::grpc_client::GrpcClient;
|
||||
use crate::ui::handlers::form::FormState;
|
||||
use common::proto::multieko2::adresar::{PostAdresarRequest, PutAdresarRequest};
|
||||
|
||||
|
||||
@@ -66,11 +66,11 @@ impl EventHandler {
|
||||
return Ok((false, message));
|
||||
},
|
||||
"force_quit" => {
|
||||
let (should_exit, message) = command_handler.handle_command("force_quit", terminal, grpc_client).await?;
|
||||
let (should_exit, message) = command_handler.handle_command("force_quit", terminal).await?;
|
||||
return Ok((should_exit, message));
|
||||
},
|
||||
"save_and_quit" => {
|
||||
let (should_exit, message) = command_handler.handle_command("save_and_quit", terminal, grpc_client).await?;
|
||||
let (should_exit, message) = command_handler.handle_command("save_and_quit", terminal).await?;
|
||||
return Ok((should_exit, message));
|
||||
},
|
||||
"revert" => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// src/tui/terminal/commands.rs
|
||||
|
||||
use crate::tui::terminal::core::TerminalCore;
|
||||
use crate::tui::terminal::grpc_client::GrpcClient;
|
||||
|
||||
pub struct CommandHandler {
|
||||
is_saved: bool,
|
||||
@@ -16,7 +15,6 @@ impl CommandHandler {
|
||||
&mut self,
|
||||
action: &str,
|
||||
terminal: &mut TerminalCore,
|
||||
grpc_client: &mut GrpcClient,
|
||||
) -> Result<(bool, String), Box<dyn std::error::Error>> {
|
||||
match action {
|
||||
"quit" => self.handle_quit(terminal).await,
|
||||
|
||||
@@ -4,7 +4,6 @@ use crossterm::{
|
||||
execute,
|
||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||
cursor::{SetCursorStyle, EnableBlinking, Show, MoveTo},
|
||||
event::Event,
|
||||
};
|
||||
use ratatui::{backend::CrosstermBackend, Terminal};
|
||||
use std::io::{self, stdout, Write};
|
||||
|
||||
Reference in New Issue
Block a user