mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-16 18:59:55 +00:00
cargo fmt
This commit is contained in:
parent
d23af83189
commit
63154f5b7a
1 changed files with 7 additions and 3 deletions
|
@ -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<W: AsyncWrite + AsyncSeek> AsyncSeek for BufWriter<W> {
|
|||
///
|
||||
/// Seeking always writes out the internal buffer before seeking.
|
||||
|
||||
fn poll_seek(mut self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom) -> Poll<io::Result<u64>> {
|
||||
fn poll_seek(
|
||||
mut self: Pin<&mut Self>,
|
||||
cx: &mut Context<'_>,
|
||||
pos: SeekFrom,
|
||||
) -> Poll<io::Result<u64>> {
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue