refactor: rename MetaPluginType::File to FileMagic
This commit is contained in:
@@ -18,7 +18,7 @@ use strum::IntoEnumIterator;
|
|||||||
#[derive(Debug, Eq, PartialEq, Clone, strum::EnumIter, strum::Display, strum::EnumString, Enum)]
|
#[derive(Debug, Eq, PartialEq, Clone, strum::EnumIter, strum::Display, strum::EnumString, Enum)]
|
||||||
#[strum(ascii_case_insensitive)]
|
#[strum(ascii_case_insensitive)]
|
||||||
pub enum MetaPluginType {
|
pub enum MetaPluginType {
|
||||||
File,
|
FileMagic,
|
||||||
None,
|
None,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ use std::io::Write;
|
|||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref META_PLUGIN_PROGRAMS: EnumMap<MetaPluginType, Option<MetaPluginProgram>> = enum_map! {
|
pub static ref META_PLUGIN_PROGRAMS: EnumMap<MetaPluginType, Option<MetaPluginProgram>> = enum_map! {
|
||||||
MetaPluginType::File => {
|
MetaPluginType::FileMagic => {
|
||||||
let program = MetaPluginProgram::new("file", vec!["-bE", "-"]);
|
let program = MetaPluginProgram::new("file", vec!["-bE", "-"]);
|
||||||
if program.supported { Some(program) } else { None }
|
if program.supported { Some(program) } else { None }
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ lazy_static! {
|
|||||||
|
|
||||||
pub fn get_meta_plugin(meta_plugin_type: MetaPluginType) -> Box<dyn MetaPlugin> {
|
pub fn get_meta_plugin(meta_plugin_type: MetaPluginType) -> Box<dyn MetaPlugin> {
|
||||||
match meta_plugin_type {
|
match meta_plugin_type {
|
||||||
MetaPluginType::File => Box::new(MetaPluginProgram::new("file", vec!["-bE", "-"])),
|
MetaPluginType::FileMagic => Box::new(MetaPluginProgram::new("file", vec!["-bE", "-"])),
|
||||||
MetaPluginType::None => Box::new(MetaPluginNone::new()),
|
MetaPluginType::None => Box::new(MetaPluginNone::new()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user