refactor: update empty hashmap initialization with lazy initialization

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:06:50 -03:00
parent 3fb436dc44
commit 1d463323ce
5 changed files with 13 additions and 8 deletions

View File

@@ -182,7 +182,7 @@ impl MetaPlugin for MagicFileMetaPlugin {
"magic_file".to_string()
}
fn configure_options(&mut self, options: &std::collections::HashMap<String, serde_yaml::Value>) -> Result<()> {
fn configure_options(&mut self, options: &std::collections::HashMap<String, serde_yaml::Value>) -> anyhow::Result<()> {
if let Some(max_buffer_size) = options.get("max_buffer_size") {
if let Some(size) = max_buffer_size.as_u64() {
self.max_buffer_size = size as usize;