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:
@@ -69,9 +69,10 @@ impl MetaPlugin for BinaryMetaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
let is_finalized = !metadata.is_empty();
|
||||
MetaPluginResponse {
|
||||
metadata,
|
||||
is_finalized: !metadata.is_empty(),
|
||||
is_finalized,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +122,7 @@ impl MetaPlugin for BinaryMetaPlugin {
|
||||
self.base.options_mut()
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user