1 2 3 4 5 6 7 8 9 10 11
use std::fmt; pub struct Writer<'w> ( pub &'w mut fmt::Write ); impl <'w> fmt::Write for Writer<'w> { fn write_str(&mut self, s: &str) -> fmt::Result { self.0.write_str(s) } }