提交 4e2da7cb 编写于 作者: B bors

auto merge of #15632 : masklinn/rust/patch-1, r=alexcrichton

I saw that it was bounded by `Show` but the implication is no guarantee (and had only 0.10 to test, where this behavior has been added to 0.11)
......@@ -536,7 +536,10 @@ pub fn unwrap_or_handle(self, op: |E| -> T) -> T {
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 {
......@@ -550,7 +553,10 @@ pub fn unwrap(self) -> T {
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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册