fix: Implement Clone for FilterChain manually
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -26,11 +26,20 @@ enum FilterType {
|
||||
StripAnsi,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct FilterChain {
|
||||
plugins: Vec<Box<dyn FilterPlugin>>,
|
||||
}
|
||||
|
||||
impl Clone for FilterChain {
|
||||
fn clone(&self) -> Self {
|
||||
let mut plugins = Vec::with_capacity(self.plugins.len());
|
||||
for plugin in &self.plugins {
|
||||
plugins.push(plugin.clone_box());
|
||||
}
|
||||
FilterChain { plugins }
|
||||
}
|
||||
}
|
||||
|
||||
impl FilterChain {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user