diff --git a/proxmox-io/src/std_channel_writer.rs b/proxmox-io/src/std_channel_writer.rs index c5131a12..72347531 100644 --- a/proxmox-io/src/std_channel_writer.rs +++ b/proxmox-io/src/std_channel_writer.rs @@ -1,19 +1,19 @@ use std::io::Write; -use std::sync::mpsc::SyncSender; use std::string::ToString; +use std::sync::mpsc::SyncSender; /// Wrapper around SyncSender, which implements Write /// /// Each write in translated into a send(Vec). pub struct StdChannelWriter(SyncSender, E>>); -impl StdChannelWriter { +impl StdChannelWriter { pub fn new(sender: SyncSender, E>>) -> Self { Self(sender) } } -impl Write for StdChannelWriter { +impl Write for StdChannelWriter { fn write(&mut self, buf: &[u8]) -> Result { self.0 .send(Ok(buf.to_vec()))