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