mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Simplify error mapping with std::io::Error::other
This commit is contained in:
@@ -16,7 +16,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