File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ pub struct ResultCode(pub ctru_sys::Result);
4040
4141impl Try for ResultCode {
4242 type Output = ( ) ;
43- type Residual = Error ;
43+ type Residual = std :: result :: Result < std :: convert :: Infallible , Error > ;
4444
4545 fn from_output ( _: Self :: Output ) -> Self {
4646 Self ( 0 )
@@ -51,7 +51,7 @@ impl Try for ResultCode {
5151 // Luckily all summary cases are for system failures (except RS_SUCCESS).
5252 // I don't know if there are any cases in libctru where a Result holds a "failing" summary but a "success" code, so we'll just check for both.
5353 if ctru_sys:: R_FAILED ( self . 0 ) || ctru_sys:: R_SUMMARY ( self . 0 ) != ctru_sys:: RS_SUCCESS {
54- ControlFlow :: Break ( self . into ( ) )
54+ ControlFlow :: Break ( Err ( self . into ( ) ) )
5555 } else {
5656 ControlFlow :: Continue ( ( ) )
5757 }
@@ -61,7 +61,7 @@ impl Try for ResultCode {
6161impl FromResidual for ResultCode {
6262 fn from_residual ( e : <Self as Try >:: Residual ) -> Self {
6363 match e {
64- Error :: Os ( result) => Self ( result) ,
64+ Err ( Error :: Os ( result) ) => Self ( result) ,
6565 _ => unreachable ! ( ) ,
6666 }
6767 }
You can’t perform that action at this time.
0 commit comments