fix: correct for loop iteration and PIPESIZE casting

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-26 18:02:05 -03:00
parent 9751e7074c
commit e2db93f955

View File

@@ -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<String, serde_yaml::Value> {
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
}