Remove unnecessary lifetime param and simplify error handling

This commit is contained in:
2025-10-14 18:00:46 +02:00
parent 6fa0f491fa
commit f8d9a50a66
2 changed files with 2 additions and 2 deletions

View File

@@ -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,

View File

@@ -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()
} }