SHE LIVES!

This commit is contained in:
2025-02-13 15:08:59 -05:00
parent d2e6c51073
commit 09dc73663d
11 changed files with 573 additions and 80 deletions

View File

@@ -30,4 +30,25 @@ impl DummyOutput {
out : String::new()
}
}
}
pub struct StringFillerOutput<'s> {
string : &'s mut String
}
impl<'s> Output for StringFillerOutput<'s> {
fn write(&mut self, data : &str) {
*self.string += data;
}
}
impl<'a> StringFillerOutput<'a> {
pub fn new(string : &'a mut String) -> StringFillerOutput<'a> {
// TODO: reserve() to make this faster than dummyoutput
StringFillerOutput {
string
}
}
}