diff --git a/src/services/downloader/mod.rs b/src/services/downloader/mod.rs index 3345d33..ad191d3 100644 --- a/src/services/downloader/mod.rs +++ b/src/services/downloader/mod.rs @@ -74,7 +74,7 @@ pub async fn download<'a>( Some((response, is_zip)) } -pub async fn download_chain<'a>( +pub async fn download_chain( book: BookWithRemote, file_type: String, source_config: config::SourceConfig, diff --git a/src/services/downloader/types.rs b/src/services/downloader/types.rs index 889b0b4..505ffab 100644 --- a/src/services/downloader/types.rs +++ b/src/services/downloader/types.rs @@ -20,7 +20,7 @@ pub struct DownloadResult { pub fn get_response_async_read(it: Response) -> impl AsyncRead { it.bytes_stream() - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) + .map_err(std::io::Error::other) .into_async_read() .compat() }