Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use reqwest::header::HeaderMap;
use reqwest::{Response, Url};
use sparse_range::SparseRange;
use std::{
io::{self, ErrorKind, SeekFrom},
io::{self, SeekFrom},
ops::Range,
pin::Pin,
sync::Arc,
Expand Down Expand Up @@ -476,7 +476,7 @@ async fn run_streamer(
.instrument(span)
.await
.and_then(error_for_status)
.map_err(|e| std::io::Error::new(ErrorKind::Other, e))
.map_err(std::io::Error::other)
{
Err(e) => {
state.error = Some(e.into());
Expand Down Expand Up @@ -585,7 +585,7 @@ impl AsyncRead for AsyncHttpRangeReader {

// If a previous error occurred we return that.
if let Some(e) = inner.streamer_state.error.as_ref() {
return Poll::Ready(Err(io::Error::new(io::ErrorKind::Other, e.clone())));
return Poll::Ready(Err(io::Error::other(e.clone())));
}

// Determine the range to be fetched
Expand Down Expand Up @@ -641,7 +641,7 @@ impl AsyncRead for AsyncHttpRangeReader {
Some(state) => {
inner.streamer_state = state;
if let Some(e) = inner.streamer_state.error.as_ref() {
return Poll::Ready(Err(io::Error::new(io::ErrorKind::Other, e.clone())));
return Poll::Ready(Err(io::Error::other(e.clone())));
}
}
}
Expand Down
Loading