From 1d61ac12434dcb88ecff7725ef3e8dddc20091a2 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Wed, 27 Aug 2025 19:40:29 -0300 Subject: [PATCH] feat: use strum to serialize MetaPluginType Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) --- src/services/meta_service.rs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/services/meta_service.rs b/src/services/meta_service.rs index 0beafdd..60c69d2 100644 --- a/src/services/meta_service.rs +++ b/src/services/meta_service.rs @@ -32,22 +32,8 @@ impl MetaService { .map(|meta_plugin_type| { debug!("META_SERVICE: Creating plugin: {:?}", meta_plugin_type); - // Get the plugin name to find its configuration - let plugin_name = match meta_plugin_type { - MetaPluginType::MagicFile => "magic_file", - MetaPluginType::Cwd => "cwd", - MetaPluginType::Binary => "binary", - MetaPluginType::Text => "text", - MetaPluginType::User => "user", - MetaPluginType::Shell => "shell", - MetaPluginType::ShellPid => "shell_pid", - MetaPluginType::KeepPid => "keep_pid", - MetaPluginType::Digest => "digest", - MetaPluginType::ReadTime => "read_time", - MetaPluginType::ReadRate => "read_rate", - MetaPluginType::Hostname => "hostname", - MetaPluginType::Program => "program", - }; + // Get the plugin name using strum's Display implementation + let plugin_name = meta_plugin_type.to_string(); // Get options and outputs from settings let (options, outputs) = if let Some(meta_plugin_configs) = &settings.meta_plugins {