Skip to content

Commit 3cb590f

Browse files
committed
Make a cosmetic adjustment
1 parent 2d8b337 commit 3cb590f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/version1/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
mod ffi;
66

7-
use std::io::{Error, ErrorKind, Result};
7+
use std::io::{Error, Result};
88
use std::path::Path;
99

1010
/// Compress.
@@ -47,12 +47,12 @@ pub fn convert<T: AsRef<Path>>(source: T, destination: T) -> Result<()> {
4747
{
4848
match compress(&data) {
4949
Some(data) => data,
50-
_ => return Err(Error::new(ErrorKind::Other, "failed to compress")),
50+
_ => return Err(Error::other("failed to compress")),
5151
}
5252
} else {
5353
match decompress(&data) {
5454
Some(data) => data,
55-
_ => return Err(Error::new(ErrorKind::Other, "failed to decompress")),
55+
_ => return Err(Error::other("failed to decompress")),
5656
}
5757
};
5858
std::fs::write(destination, data)

src/version2/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
mod ffi;
66

7-
use std::io::{Error, ErrorKind, Result};
7+
use std::io::{Error, Result};
88
use std::path::Path;
99

1010
/// Compress.
@@ -86,12 +86,12 @@ pub fn convert<T: AsRef<Path>>(
8686
transform.unwrap_or(true),
8787
) {
8888
Some(data) => data,
89-
_ => return Err(Error::new(ErrorKind::Other, "failed to compress")),
89+
_ => return Err(Error::other("failed to compress")),
9090
}
9191
} else {
9292
match decompress(&data) {
9393
Some(data) => data,
94-
_ => return Err(Error::new(ErrorKind::Other, "failed to decompress")),
94+
_ => return Err(Error::other("failed to decompress")),
9595
}
9696
};
9797
std::fs::write(destination, data)

0 commit comments

Comments
 (0)