File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ use pkg_schema::objects;
1010impl Installer for objects:: Test {
1111 async fn check_requirements ( & self , _: & Context ) -> super :: Result < ( ) > {
1212 if self . force_check_requirements_fail {
13- return Err ( std:: io:: Error :: new (
14- std:: io:: ErrorKind :: Other ,
15- "fail to check the requirements" ,
16- )
17- . into ( ) ) ;
13+ return Err ( std:: io:: Error :: other ( "fail to check the requirements" ) . into ( ) ) ;
1814 }
1915 Ok ( ( ) )
2016 }
Original file line number Diff line number Diff line change 6060 R : bitar:: archive_reader:: ArchiveReader < Error = E1 > ,
6161 E2 : From < E1 >
6262 + From < std:: io:: Error >
63- + From < bitar:: HashSumMismatchError >
63+ + From < Box < bitar:: HashSumMismatchError > >
6464 + From < bitar:: CompressionError > ,
6565{
6666 // Open output file
9898 let compressed = result?;
9999 // read_archive_bytes += compressed.len();
100100 let unverified = compressed. decompress ( ) ?;
101- let verified = unverified. verify ( ) ?;
101+ let verified = unverified. verify ( ) . map_err ( |e| E2 :: from ( Box :: new ( e ) ) ) ?;
102102 output. feed ( & verified) . await ?;
103103 }
104104
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ pub enum Error {
6363 #[ display( fmt = "bita operation failed due to compression error: {}" , _0) ]
6464 BitaCompression ( bitar:: CompressionError ) ,
6565 #[ display( fmt = "bita operation failed due to hash sum mismatch error: {}" , _0) ]
66- BitaHashSum ( bitar:: HashSumMismatchError ) ,
66+ BitaHashSum ( Box < bitar:: HashSumMismatchError > ) ,
6767 #[ display( fmt = "bita operation failed due to invalid url: {}" , _0) ]
6868 BitaUrl ( url:: ParseError ) ,
6969}
You can’t perform that action at this time.
0 commit comments