|
1 | | -use anyhow::{anyhow, bail, ensure, Context, Result}; |
| 1 | +use anyhow::{Context, Result, anyhow, bail, ensure}; |
2 | 2 | use async_compression::futures::bufread::GzipDecoder; |
3 | 3 | use bmap_parser::{AsyncDiscarder, Bmap, Discarder, SeekForward}; |
4 | | -use clap::{arg, command, Arg, ArgAction, Command}; |
| 4 | +use clap::{Arg, ArgAction, Command, arg, command}; |
5 | 5 | use flate2::read::GzDecoder; |
6 | 6 | use futures::TryStreamExt; |
7 | 7 | use indicatif::{ProgressBar, ProgressState, ProgressStyle}; |
@@ -241,7 +241,7 @@ async fn copy_remote_input(source: Url, destination: PathBuf) -> Result<()> { |
241 | 241 | let res = setup_remote_input(source).await?; |
242 | 242 | let stream = res |
243 | 243 | .bytes_stream() |
244 | | - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) |
| 244 | + .map_err(std::io::Error::other) |
245 | 245 | .into_async_read(); |
246 | 246 | let reader = GzipDecoder::new(stream); |
247 | 247 | let mut input = AsyncDiscarder::new(reader); |
@@ -291,7 +291,7 @@ async fn copy_remote_input_nobmap(source: Url, destination: PathBuf) -> Result<( |
291 | 291 | let res = setup_remote_input(source).await?; |
292 | 292 | let stream = res |
293 | 293 | .bytes_stream() |
294 | | - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) |
| 294 | + .map_err(std::io::Error::other) |
295 | 295 | .into_async_read(); |
296 | 296 | let reader = GzipDecoder::new(stream); |
297 | 297 | let mut input = AsyncDiscarder::new(reader); |
|
0 commit comments