From cae1cfcaf23fd22d8983acbfde21c28e75c295ba Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Tue, 29 Jul 2025 14:11:01 -0300 Subject: [PATCH] fix: resolve borrowing issue in meta plugin support check Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) --- src/modes/save.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modes/save.rs b/src/modes/save.rs index 660e967..6ae6ab6 100644 --- a/src/modes/save.rs +++ b/src/modes/save.rs @@ -69,13 +69,17 @@ pub fn mode_save( .collect(); // Check for unsupported meta plugins, warn the user, and remove them from the list + let mut i = 0; meta_plugins.retain(|meta_plugin| { - // We need to get the type somehow, but we can't easily do that from the trait - // So we'll check support and warn if needed let is_supported = meta_plugin.is_supported(); if !is_supported { - eprintln!("Warning: Meta plugin '{}' is enabled but not supported on this system", meta_plugin.meta_name()); + // We need to get the meta name for the warning message + // Since we can't mutably borrow meta_plugin here, we create a temporary one + let meta_plugin_type = meta_plugin_types[i].clone(); + let mut temp_plugin = get_meta_plugin(meta_plugin_type); + eprintln!("Warning: Meta plugin '{}' is enabled but not supported on this system", temp_plugin.meta_name()); } + i += 1; is_supported });