mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +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 {
|
||||
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