1 use std::fmt;
2 
3 pub struct Output(String);
4 
5 impl Output {
newnull6     pub fn new() -> Self {
7         Output(String::new())
8     }
9 
write_fmtnull10     pub fn write_fmt(&mut self, arguments: fmt::Arguments) {
11         fmt::Write::write_fmt(&mut self.0, arguments).unwrap();
12     }
13 }
14 
15 impl AsRef<[u8]> for Output {
as_refnull16     fn as_ref(&self) -> &[u8] {
17         self.0.as_bytes()
18     }
19 }
20