From e2db93f95524beac3305df55d456ca85df22f306 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Tue, 26 Aug 2025 18:02:05 -0300 Subject: [PATCH] fix: correct for loop iteration and PIPESIZE casting Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) --- src/meta_plugin/magic.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meta_plugin/magic.rs b/src/meta_plugin/magic.rs index 9bffa7b..90b5ad7 100644 --- a/src/meta_plugin/magic.rs +++ b/src/meta_plugin/magic.rs @@ -103,8 +103,8 @@ impl MagicFileMetaPlugin { ("file_type", CookieFlags::default()), ]; - for (name, flags) & types_to_process { - if let Ok(result) = self.get_magic_result(flags) { + for (name, flags) in types_to_process.iter() { + if let Ok(result) = self.get_magic_result(*flags) { if !result.is_empty() { // Use process_metadata_outputs to handle output mapping if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs( @@ -206,7 +206,7 @@ impl MetaPlugin for MagicFileMetaPlugin { fn default_options(&self) -> std::collections::HashMap { let mut options = std::collections::HashMap::new(); - options.insert("max_buffer_size".to_string(), serde_yaml::Value::Number(PIPESIZE.into())); + options.insert("max_buffer_size".to_string(), serde_yaml::Value::Number(serde_yaml::Number::from(PIPESIZE as i64))); options }