Skip to content

Commit

Permalink
Auto merge of #31728 - Amanieu:recoversafe_into_inner, r=alexcrichton
Browse files Browse the repository at this point in the history
This allows a `FnOnce` to be wrapped in an `AssertRecoverSafe`.
  • Loading branch information
bors committed Feb 18, 2016
2 parents 7dd3b20 + b6a65df commit f075698
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libstd/panic.rs
Expand Up @@ -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> {
Expand Down

0 comments on commit f075698

Please sign in to comment.