Skip to content

Commit 864bcb2

Browse files
authored
Fix new clippy lints (#27)
1 parent c2a1b5a commit 864bcb2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use reqwest::header::HeaderMap;
2626
use reqwest::{Response, Url};
2727
use sparse_range::SparseRange;
2828
use std::{
29-
io::{self, ErrorKind, SeekFrom},
29+
io::{self, SeekFrom},
3030
ops::Range,
3131
pin::Pin,
3232
sync::Arc,
@@ -476,7 +476,7 @@ async fn run_streamer(
476476
.instrument(span)
477477
.await
478478
.and_then(error_for_status)
479-
.map_err(|e| std::io::Error::new(ErrorKind::Other, e))
479+
.map_err(std::io::Error::other)
480480
{
481481
Err(e) => {
482482
state.error = Some(e.into());
@@ -585,7 +585,7 @@ impl AsyncRead for AsyncHttpRangeReader {
585585

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

591591
// Determine the range to be fetched
@@ -641,7 +641,7 @@ impl AsyncRead for AsyncHttpRangeReader {
641641
Some(state) => {
642642
inner.streamer_state = state;
643643
if let Some(e) = inner.streamer_state.error.as_ref() {
644-
return Poll::Ready(Err(io::Error::new(io::ErrorKind::Other, e.clone())));
644+
return Poll::Ready(Err(io::Error::other(e.clone())));
645645
}
646646
}
647647
}

0 commit comments

Comments
 (0)