refactor: rename common.rs to plugins.rs and update imports
This commit is contained in:
15
src/plugins.rs
Normal file
15
src/plugins.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
pub(crate) use std::io::Write;
|
||||
|
||||
pub 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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user