Add into_inner to AssertRecoverSafe

This commit is contained in:
Amanieu d'Antras 2016-02-17 11:29:18 +00:00
parent 0d1cd9bd6a
commit b6a65df6d5

View File

@ -193,6 +193,12 @@ impl<T> AssertRecoverSafe<T> {
pub fn new(t: T) -> AssertRecoverSafe<T> { pub fn new(t: T) -> AssertRecoverSafe<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> { impl<T> Deref for AssertRecoverSafe<T> {