function was not good alligned and removed as_any() and as_any_mut() from output

This commit is contained in:
TimonPost 2018-09-16 12:40:02 +02:00
parent 0eba0e2056
commit e0b0e232ea
4 changed files with 1 additions and 27 deletions

View File

@ -32,14 +32,6 @@ impl IStdout for AnsiOutput {
let mut handle = out.lock(); let mut handle = out.lock();
handle.flush() handle.flush()
} }
fn as_any(&self) -> &Any {
self
}
fn as_any_mut(&mut self) -> &mut Any {
self
}
} }
impl AnsiOutput { impl AnsiOutput {

View File

@ -32,7 +32,4 @@ trait IStdout {
fn write(&self, buf: &[u8]) -> io::Result<usize>; fn write(&self, buf: &[u8]) -> io::Result<usize>;
/// Flush the current output. /// Flush the current output.
fn flush(&self) -> io::Result<()>; fn flush(&self) -> io::Result<()>;
fn as_any(&self) -> &Any;
fn as_any_mut(&mut self) -> &mut Any;
} }

View File

@ -67,13 +67,6 @@ impl TerminalOutput {
pub fn write_buf(&self, buf: &[u8]) -> io::Result<usize> { pub fn write_buf(&self, buf: &[u8]) -> io::Result<usize> {
self.stdout.write(buf) self.stdout.write(buf)
} }
pub fn as_any(&self) -> &Any {
self.stdout.as_any()
}
pub fn as_any_mut(&mut self) -> &mut Any {
self.stdout.as_any_mut()
}
} }
impl Default for TerminalOutput impl Default for TerminalOutput

View File

@ -33,14 +33,6 @@ impl IStdout for WinApiOutput {
fn flush(&self) -> io::Result<()> { fn flush(&self) -> io::Result<()> {
Ok(()) Ok(())
} }
fn as_any(&self) -> &Any {
self
}
fn as_any_mut(&mut self) -> &mut Any {
self
}
} }
unsafe impl Send for WinApiOutput {} unsafe impl Send for WinApiOutput {}