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 });