Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize Ready::into_inner() #116528

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions library/core/src/future/ready.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@ impl<T> Ready<T> {
/// # Examples
///
/// ```
/// #![feature(ready_into_inner)]
/// use std::future;
///
/// let a = future::ready(1);
/// assert_eq!(a.into_inner(), 1);
/// assert_eq!(a.unwrap(), 1);
/// ```
#[unstable(feature = "ready_into_inner", issue = "101196")]
#[stable(feature = "ready_into_inner", since = "CURRENT_RUSTC_VERSION")]
daxpedda marked this conversation as resolved.
Show resolved Hide resolved
#[must_use]
#[inline]
pub fn into_inner(self) -> T {
self.0.expect("Called `into_inner()` on `Ready` after completion")
pub fn unwrap(self) -> T {
self.0.expect("Called `unwrap()` on `Ready` after completion")
}
}

Expand Down