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))
|
Some((response, is_zip))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn download_chain<'a>(
|
pub async fn download_chain(
|
||||||
book: BookWithRemote,
|
book: BookWithRemote,
|
||||||
file_type: String,
|
file_type: String,
|
||||||
source_config: config::SourceConfig,
|
source_config: config::SourceConfig,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ pub struct DownloadResult {
|
|||||||
|
|
||||||
pub fn get_response_async_read(it: Response) -> impl AsyncRead {
|
pub fn get_response_async_read(it: Response) -> impl AsyncRead {
|
||||||
it.bytes_stream()
|
it.bytes_stream()
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
|
.map_err(std::io::Error::other)
|
||||||
.into_async_read()
|
.into_async_read()
|
||||||
.compat()
|
.compat()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user