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,
|
StripAnsi,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
|
||||||
pub struct FilterChain {
|
pub struct FilterChain {
|
||||||
plugins: Vec<Box<dyn FilterPlugin>>,
|
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 {
|
impl FilterChain {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user