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:
@@ -196,7 +196,9 @@ pub trait MetaPlugin {
|
||||
|
||||
// Access to outputs mapping with default implementation
|
||||
fn outputs(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
static EMPTY: std::collections::HashMap<String, serde_yaml::Value> = std::collections::HashMap::new();
|
||||
use once_cell::sync::Lazy;
|
||||
static EMPTY: Lazy<std::collections::HashMap<String, serde_yaml::Value>> =
|
||||
Lazy::new(|| std::collections::HashMap::new());
|
||||
&EMPTY
|
||||
}
|
||||
|
||||
@@ -206,7 +208,9 @@ pub trait MetaPlugin {
|
||||
|
||||
// Access to options mapping with default implementation
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
static EMPTY: std::collections::HashMap<String, serde_yaml::Value> = std::collections::HashMap::new();
|
||||
use once_cell::sync::Lazy;
|
||||
static EMPTY: Lazy<std::collections::HashMap<String, serde_yaml::Value>> =
|
||||
Lazy::new(|| std::collections::HashMap::new());
|
||||
&EMPTY
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user