mirror of
https://github.com/Zenithsiz/dynatos.git
synced 2026-02-05 19:13:49 +00:00
Option<T> can now be ?d in a function that returns Loadable<T, E>.
This commit is contained in:
parent
354e5db27c
commit
5adc1a41a7
@ -184,6 +184,15 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, E> FromResidual<Option<Infallible>> for Loadable<T, E> {
|
||||
fn from_residual(residual: Option<Infallible>) -> Self {
|
||||
match residual {
|
||||
Some(never) => match never {},
|
||||
None => Self::Empty,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Collects an iterator of `Loadable<T, E>` into a `Loadable<C, E>`,
|
||||
/// where `C` is a collection of `T`s.
|
||||
///
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user