aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-25 11:07:23 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-25 11:07:23 +0200
commit7499721a10d1d9e977024224b9d80d91ce93628b (patch)
tree6a7be48045b7eaffb81c11632544679d8deaef81 /src
parentc17a5f84ff078826084c3a990f1890461c817346 (diff)
downloadnetapp-7499721a10d1d9e977024224b9d80d91ce93628b.tar.gz
netapp-7499721a10d1d9e977024224b9d80d91ce93628b.zip
Cargo fmt
Diffstat (limited to 'src')
-rw-r--r--src/stream.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/stream.rs b/src/stream.rs
index f5607b3..beb6b9c 100644
--- a/src/stream.rs
+++ b/src/stream.rs
@@ -200,7 +200,7 @@ fn u8_to_io_error(v: u8) -> std::io::Error {
}
fn io_error_to_u8(e: std::io::Error) -> u8 {
- use std::io::{ErrorKind};
+ use std::io::ErrorKind;
match e.kind() {
ErrorKind::ConnectionAborted => 101,
ErrorKind::BrokenPipe => 102,
@@ -217,8 +217,7 @@ fn io_error_to_u8(e: std::io::Error) -> u8 {
}
pub fn asyncread_stream<R: AsyncRead + Send + Sync + 'static>(reader: R) -> ByteStream {
- Box::pin(tokio_util::io::ReaderStream::new(reader)
- .map_err(io_error_to_u8))
+ Box::pin(tokio_util::io::ReaderStream::new(reader).map_err(io_error_to_u8))
}
pub fn stream_asyncread(stream: ByteStream) -> impl AsyncRead + Send + Sync + 'static {