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 }