File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 44
55mod ffi;
66
7- use std:: io:: { Error , ErrorKind , Result } ;
7+ use std:: io:: { Error , Result } ;
88use 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)
Original file line number Diff line number Diff line change 44
55mod ffi;
66
7- use std:: io:: { Error , ErrorKind , Result } ;
7+ use std:: io:: { Error , Result } ;
88use 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)
You can’t perform that action at this time.
0 commit comments