Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,10 @@ impl<T, E> Result<T, E> {
impl<T, E: Show> Result<T, E> {
/// Unwraps a result, yielding the content of an `Ok`.
///
/// Fails if the value is an `Err`.
/// # Failure
///
/// Fails if the value is an `Err`, with a custom failure message provided
/// by the `Err`'s value.
#[inline]
pub fn unwrap(self) -> T {
match self {
Expand All @@ -550,7 +553,10 @@ impl<T, E: Show> Result<T, E> {
impl<T: Show, E> Result<T, E> {
/// Unwraps a result, yielding the content of an `Err`.
///
/// Fails if the value is an `Ok`.
/// # Failure
///
/// Fails if the value is an `Ok`, with a custom failure message provided
/// by the `Ok`'s value.
#[inline]
pub fn unwrap_err(self) -> E {
match self {
Expand Down