Simplify error mapping with std::io::Error::other

This commit is contained in:
2025-10-14 18:03:36 +02:00
parent f9e1918c55
commit 01a0edcd34

View File

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