aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 45bef2f..26431ac 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -61,3 +61,14 @@ impl Default for Parser {
Self::new(24, 80, 0)
}
}
+
+impl std::io::Write for Parser {
+ fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
+ self.process(buf);
+ Ok(buf.len())
+ }
+
+ fn flush(&mut self) -> std::io::Result<()> {
+ Ok(())
+ }
+}