fix: Fix unused imports and ProgramWriter issues
This commit is contained in:
@@ -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! {
|
||||
|
||||
Reference in New Issue
Block a user