We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
FromResidual<Result<!, Error>>
Status
1 parent 1561f67 commit ad6b5feCopy full SHA for ad6b5fe
src/result/status.rs
@@ -1,5 +1,8 @@
1
use super::{Completion, Error, Result};
2
-use core::ops::{ControlFlow, FromResidual, Try};
+use core::{
3
+ convert::Infallible,
4
+ ops::{ControlFlow, FromResidual, Try},
5
+};
6
use core::{fmt::Debug, num::NonZeroUsize};
7
8
/// Bit indicating that an UEFI status code is an error
@@ -194,6 +197,15 @@ impl FromResidual for Status {
194
197
}
195
198
196
199
200
+impl FromResidual<core::result::Result<Infallible, Error>> for Status {
201
+ fn from_residual(r: core::result::Result<Infallible, Error>) -> Self {
202
+ match r {
203
+ Err(err) => err.status(),
204
+ Ok(infallible) => match infallible {},
205
+ }
206
207
+}
208
+
209
// FIXME: This conversion will go away along with usage of the ucs2 crate
210
211
impl From<ucs2::Error> for Status {
0 commit comments