refactor: move ProgramWriter to common.rs
This commit is contained in:
@@ -35,21 +35,6 @@ pub trait MetaPlugin {
|
||||
|
||||
use std::io::Write;
|
||||
|
||||
// Writer that implements Write for the program meta plugin
|
||||
struct ProgramWriter {
|
||||
stdin: std::process::ChildStdin,
|
||||
}
|
||||
|
||||
impl Write for ProgramWriter {
|
||||
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
|
||||
self.stdin.write(buf)
|
||||
}
|
||||
|
||||
fn flush(&mut self) -> std::io::Result<()> {
|
||||
self.stdin.flush()
|
||||
}
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
pub static ref META_PLUGIN_PROGRAMS: EnumMap<MetaPluginType, Option<MetaPluginProgram>> = enum_map! {
|
||||
MetaPluginType::File => {
|
||||
|
||||
Reference in New Issue
Block a user