From 63154f5b7affe73585c340de19b071a60643784b Mon Sep 17 00:00:00 2001 From: Kirill Mironov Date: Tue, 24 Sep 2019 16:33:02 +0300 Subject: [PATCH] cargo fmt --- src/io/buf_writer.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/io/buf_writer.rs b/src/io/buf_writer.rs index 62efbae..2b7545a 100644 --- a/src/io/buf_writer.rs +++ b/src/io/buf_writer.rs @@ -1,6 +1,6 @@ use crate::task::{Context, Poll}; use futures_core::ready; -use futures_io::{AsyncWrite, AsyncSeek, SeekFrom}; +use futures_io::{AsyncSeek, AsyncWrite, SeekFrom}; use std::fmt; use std::io; use std::pin::Pin; @@ -292,7 +292,11 @@ impl AsyncSeek for BufWriter { /// /// Seeking always writes out the internal buffer before seeking. - fn poll_seek(mut self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom) -> Poll> { + fn poll_seek( + mut self: Pin<&mut Self>, + cx: &mut Context<'_>, + pos: SeekFrom, + ) -> Poll> { ready!(self.as_mut().poll_flush_buf(cx))?; self.inner().poll_seek(cx, pos) } @@ -302,9 +306,9 @@ mod tests { #![allow(unused_imports)] use super::BufWriter; + use crate::io::{self, SeekFrom}; use crate::prelude::*; use crate::task; - use crate::io::{self, SeekFrom}; #[test] fn test_buffered_writer() {