buf: &[u8],
) -> Poll<io::Result<usize>>;
- fn poll_flush(
- self: Pin<&mut Self>,
- cx: &mut Context,
- ) -> Poll<io::Result<()>>;
+ fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>>;
- fn poll_close(
- self: Pin<&mut Self>,
- cx: &mut Context,
- ) -> Poll<io::Result<()>>;
+ fn poll_close(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>>;
/// While writing to a pxar archive we need to remember how much dat we've written to track some
/// offsets. Particularly items like the goodbye table need to be able to compute offsets to
#[cfg(any(feature = "tokio-io", feature = "futures-io"))]
pub fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
unsafe {
- self.map_unchecked_mut(|this| &mut this.output).poll_flush(cx)
+ self.map_unchecked_mut(|this| &mut this.output)
+ .poll_flush(cx)
}
}
#[cfg(any(feature = "tokio-io", feature = "futures-io"))]
pub fn poll_close(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
unsafe {
- self.map_unchecked_mut(|this| &mut this.output).poll_close(cx)
+ self.map_unchecked_mut(|this| &mut this.output)
+ .poll_close(cx)
}
}
#[cfg(feature = "tokio-io")]
impl<'a> tokio::io::AsyncWrite for FileImpl<'a> {
- fn poll_write(
- self: Pin<&mut Self>,
- cx: &mut Context,
- buf: &[u8],
- ) -> Poll<io::Result<usize>> {
+ fn poll_write(self: Pin<&mut Self>, cx: &mut Context, buf: &[u8]) -> Poll<io::Result<usize>> {
FileImpl::poll_write(self, cx, buf)
}
#[cfg(feature = "futures-io")]
impl<'a> futures::io::AsyncWrite for FileImpl<'a> {
- fn poll_write(
- self: Pin<&mut Self>,
- cx: &mut Context,
- buf: &[u8],
- ) -> Poll<io::Result<usize>> {
+ fn poll_write(self: Pin<&mut Self>, cx: &mut Context, buf: &[u8]) -> Poll<io::Result<usize>> {
FileImpl::poll_write(self, cx, buf)
}