aboutsummaryrefslogtreecommitdiff
path: root/src/stream.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream.rs')
-rw-r--r--src/stream.rs36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/stream.rs b/src/stream.rs
index 3518246..6e00e5f 100644
--- a/src/stream.rs
+++ b/src/stream.rs
@@ -150,42 +150,6 @@ impl<'a> Future for ByteStreamReadExact<'a> {
// ----
-/*
-fn u8_to_io_error(v: u8) -> std::io::Error {
- use std::io::{Error, ErrorKind};
- let kind = match v {
- 101 => ErrorKind::ConnectionAborted,
- 102 => ErrorKind::BrokenPipe,
- 103 => ErrorKind::WouldBlock,
- 104 => ErrorKind::InvalidInput,
- 105 => ErrorKind::InvalidData,
- 106 => ErrorKind::TimedOut,
- 107 => ErrorKind::Interrupted,
- 108 => ErrorKind::UnexpectedEof,
- 109 => ErrorKind::OutOfMemory,
- 110 => ErrorKind::ConnectionReset,
- _ => ErrorKind::Other,
- };
- Error::new(kind, "(in netapp stream)")
-}
-
-fn io_error_to_u8(e: std::io::Error) -> u8 {
- use std::io::ErrorKind;
- match e.kind() {
- ErrorKind::ConnectionAborted => 101,
- ErrorKind::BrokenPipe => 102,
- ErrorKind::WouldBlock => 103,
- ErrorKind::InvalidInput => 104,
- ErrorKind::InvalidData => 105,
- ErrorKind::TimedOut => 106,
- ErrorKind::Interrupted => 107,
- ErrorKind::UnexpectedEof => 108,
- ErrorKind::OutOfMemory => 109,
- ErrorKind::ConnectionReset => 110,
- _ => 100,
- }
-}
-*/
pub fn asyncread_stream<R: AsyncRead + Send + Sync + 'static>(reader: R) -> ByteStream {
Box::pin(tokio_util::io::ReaderStream::new(reader))