fix: Fix unused imports and ProgramWriter issues

This commit is contained in:
Andrew Phillips (aider)
2025-05-12 20:39:16 -03:00
parent 539c48aa2a
commit e0d3f86c49
4 changed files with 9 additions and 26 deletions

View File

@@ -1,6 +1,5 @@
use anyhow::{anyhow, Context, Result};
use anyhow::{anyhow, Result};
use std::io;
use std::io::{Read, Write};
use log::*;
@@ -37,23 +36,9 @@ pub trait DigestEngine {
fn update(&mut self, data: &[u8]);
}
// Dummy writer that implements Write for the none digest engine
struct DummyWriter;
impl DummyWriter {
fn new() -> Self {
DummyWriter
}
}
impl Write for DummyWriter {
fn write(&mut self, _buf: &[u8]) -> io::Result<usize> {
Ok(0)
}
fn flush(&mut self) -> io::Result<()> {
Ok(())
}
// Writer that implements Write for the program digest engine
struct ProgramWriter {
stdin: std::process::ChildStdin,
}
lazy_static! {