refactor: dead code removed, methods renamed

This commit is contained in:
Jack Wills
2024-11-18 10:28:27 +00:00
parent 7f42383495
commit ba6a952413
3 changed files with 3 additions and 12 deletions
+1 -5
View File
@@ -2,15 +2,13 @@ use crate::app_data::DockerCommand;
use std::fmt;
/// app errors to set in global state
#[allow(unused)]
// #[allow(unused)]
#[derive(Debug, Clone, Copy)]
pub enum AppError {
DockerCommand(DockerCommand),
DockerExec,
DockerLogs,
DockerConnect,
DockerInterval,
InputPoll,
MouseCapture(bool),
Terminal,
}
@@ -23,8 +21,6 @@ impl fmt::Display for AppError {
Self::DockerExec => write!(f, "Unable to exec into container"),
Self::DockerLogs => write!(f, "Unable to save logs"),
Self::DockerConnect => write!(f, "Unable to access docker daemon"),
Self::DockerInterval => write!(f, "Docker update interval needs to be greater than 0"),
Self::InputPoll => write!(f, "Unable to poll user input"),
Self::MouseCapture(x) => {
let reason = if *x { "en" } else { "dis" };
write!(f, "Unable to {reason}able mouse capture")