Skip to content

Commit

Permalink
Rename to Ready::unwrap()
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Dec 19, 2023
1 parent 208ebfc commit 1800c0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/future/ready.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ impl<T> Ready<T> {
/// use std::future;
///
/// let a = future::ready(1);
/// assert_eq!(a.into_inner(), 1);
/// assert_eq!(a.unwrap(), 1);
/// ```
#[stable(feature = "ready_into_inner", since = "CURRENT_RUSTC_VERSION")]
#[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

0 comments on commit 1800c0c

Please sign in to comment.