16 lines
319 B
Rust
16 lines
319 B
Rust
pub(crate) use std::io::Write;
|
|
|
|
pub struct ProgramWriter {
|
|
pub 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()
|
|
}
|
|
}
|