File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
use super :: { Completion , Error , Result } ;
2
- use core:: ops:: { ControlFlow , FromResidual , Try } ;
2
+ use core:: { convert :: Infallible , ops:: { ControlFlow , FromResidual , Try } } ;
3
3
use core:: { fmt:: Debug , num:: NonZeroUsize } ;
4
4
5
5
/// Bit indicating that an UEFI status code is an error
@@ -194,6 +194,15 @@ impl FromResidual for Status {
194
194
}
195
195
}
196
196
197
+ impl FromResidual < core:: result:: Result < Infallible , Error > > for Status {
198
+ fn from_residual ( r : core:: result:: Result < Infallible , Error > ) -> Self {
199
+ match r {
200
+ Err ( err) => err. status ( ) ,
201
+ Ok ( infallible) => match infallible { } ,
202
+ }
203
+ }
204
+ }
205
+
197
206
// FIXME: This conversion will go away along with usage of the ucs2 crate
198
207
199
208
impl From < ucs2:: Error > for Status {
You can’t perform that action at this time.
0 commit comments