diff --git a/src/modes/status.rs b/src/modes/status.rs index 48bc942..b3deb62 100644 --- a/src/modes/status.rs +++ b/src/modes/status.rs @@ -1,7 +1,6 @@ use clap::*; use is_terminal::IsTerminal; use std::path::PathBuf; -use std::str::FromStr; use log::debug; use crate::modes::common::{get_format_box_chars_no_border_line_separator, OutputFormat}; @@ -11,10 +10,9 @@ use serde_json; use serde_yaml; use prettytable::row; use prettytable::{Attr, Cell, Row, Table}; -use prettytable::format::consts::{FORMAT_BOX_CHARS, FORMAT_NO_BORDER_LINE_SEPARATOR}; +use prettytable::format::consts::{FORMAT_NO_BORDER_LINE_SEPARATOR}; -use crate::meta_plugin::{MetaPluginType, get_meta_plugin}; -use crate::common::status::{PathInfo, CompressionInfo, MetaPluginInfo}; +use crate::common::status::{PathInfo, CompressionInfo}; fn build_path_table(path_info: &PathInfo) -> Table { let mut path_table = Table::new(); diff --git a/src/modes/status_plugins.rs b/src/modes/status_plugins.rs index bb8330e..4b3f815 100644 --- a/src/modes/status_plugins.rs +++ b/src/modes/status_plugins.rs @@ -1,11 +1,11 @@ use clap::*; use is_terminal::IsTerminal; use std::path::PathBuf; +use std::str::FromStr; use log::debug; -use crate::modes::common::{get_format_box_chars_no_border_line_separator, OutputFormat}; +use crate::modes::common::OutputFormat; use crate::config; -use prettytable::color; use serde_json; use serde_yaml; use prettytable::row; @@ -40,9 +40,9 @@ fn build_meta_plugins_configured_table(settings: &config::Settings) -> Option plugin_type, - Err(_) => continue, + let meta_plugin_type = match MetaPluginType::from(&plugin_config.name) { + Some(plugin_type) => plugin_type, + None => continue, }; // First, create a default plugin to get its default options @@ -177,9 +177,9 @@ fn build_meta_plugin_table(meta_plugin_info: &std::collections::HashMap plugin_type, - Err(_) => continue, + let meta_plugin_type = match MetaPluginType::from(&info.meta_name) { + Some(plugin_type) => plugin_type, + None => continue, }; // Create a default plugin to get its default options