mirror of
https://github.com/flibusta-apps/books_downloader.git
synced 2025-12-06 15:05:37 +01:00
Remove unnecessary lifetime param and simplify error handling
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user