Auto merge of #31728 - Amanieu:recoversafe_into_inner, r=alexcrichton
This allows a `FnOnce` to be wrapped in an `AssertRecoverSafe`.
This commit is contained in:
commit
f075698ea5
@ -193,6 +193,12 @@ impl<T> AssertRecoverSafe<T> {
|
||||
pub fn new(t: T) -> AssertRecoverSafe<T> {
|
||||
AssertRecoverSafe(t)
|
||||
}
|
||||
|
||||
/// Consumes the `AssertRecoverSafe`, returning the wrapped value.
|
||||
#[unstable(feature = "recover", reason = "awaiting feedback", issue = "27719")]
|
||||
pub fn into_inner(self) -> T {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for AssertRecoverSafe<T> {
|
||||
|
Loading…
Reference in New Issue
Block a user