fix: Correct MetaPluginType conversion and remove unused imports

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-03 08:50:57 -03:00
parent 618c164d2d
commit 3a90c12dc2
2 changed files with 10 additions and 12 deletions

View File

@@ -1,7 +1,6 @@
use clap::*; use clap::*;
use is_terminal::IsTerminal; use is_terminal::IsTerminal;
use std::path::PathBuf; use std::path::PathBuf;
use std::str::FromStr;
use log::debug; use log::debug;
use crate::modes::common::{get_format_box_chars_no_border_line_separator, OutputFormat}; use crate::modes::common::{get_format_box_chars_no_border_line_separator, OutputFormat};
@@ -11,10 +10,9 @@ use serde_json;
use serde_yaml; use serde_yaml;
use prettytable::row; use prettytable::row;
use prettytable::{Attr, Cell, Row, Table}; 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};
use crate::common::status::{PathInfo, CompressionInfo, MetaPluginInfo};
fn build_path_table(path_info: &PathInfo) -> Table { fn build_path_table(path_info: &PathInfo) -> Table {
let mut path_table = Table::new(); let mut path_table = Table::new();

View File

@@ -1,11 +1,11 @@
use clap::*; use clap::*;
use is_terminal::IsTerminal; use is_terminal::IsTerminal;
use std::path::PathBuf; use std::path::PathBuf;
use std::str::FromStr;
use log::debug; 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 crate::config;
use prettytable::color;
use serde_json; use serde_json;
use serde_yaml; use serde_yaml;
use prettytable::row; use prettytable::row;
@@ -40,9 +40,9 @@ fn build_meta_plugins_configured_table(settings: &config::Settings) -> Option<Ta
for plugin_config in sorted_meta_plugins { for plugin_config in sorted_meta_plugins {
// Create the plugin to get its default options // Create the plugin to get its default options
let meta_plugin_type = match MetaPluginType::from_str(&plugin_config.name) { let meta_plugin_type = match MetaPluginType::from(&plugin_config.name) {
Ok(plugin_type) => plugin_type, Some(plugin_type) => plugin_type,
Err(_) => continue, None => continue,
}; };
// First, create a default plugin to get its default options // 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<String,
for info in sorted_meta_plugin_info { for info in sorted_meta_plugin_info {
// Get default options for the meta plugin // Get default options for the meta plugin
let meta_plugin_type = match MetaPluginType::from_str(&info.meta_name) { let meta_plugin_type = match MetaPluginType::from(&info.meta_name) {
Ok(plugin_type) => plugin_type, Some(plugin_type) => plugin_type,
Err(_) => continue, None => continue,
}; };
// Create a default plugin to get its default options // Create a default plugin to get its default options