refactor: Simplify filter plugin return values and apply io::copy directly

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-02 12:40:28 -03:00
parent 2773855cec
commit e7cae3d12f
2 changed files with 2 additions and 4 deletions

View File

@@ -30,8 +30,7 @@ impl FilterPlugin for SkipBytesFilter {
}
// Copy the remaining data using io::copy for efficiency
std::io::copy(reader, writer)?;
Ok(())
std::io::copy(reader, writer)
}
}

View File

@@ -14,7 +14,6 @@ impl FilterPlugin for StripAnsiFilter {
fn filter<R: Read, W: Write>(&mut self, reader: &mut R, writer: &mut W) -> Result<()> {
let mut ansi_writer = Writer::new(writer);
std::io::copy(reader, &mut ansi_writer)?;
ansi_writer.flush()?;
Ok(())
ansi_writer.flush()
}
}