Merge pull request #4243 from erickt/incoming

Fix a bug in Result::unwrap_err (and minor cleanup)
This commit is contained in:
Tim Chevalier
2012-12-23 13:49:32 -08:00
2 changed files with 40 additions and 79 deletions

View File

@@ -234,7 +234,7 @@ impl<T, E> Result<T, E> {
pure fn unwrap(self) -> T { unwrap(self) }
#[inline(always)]
pure fn unwrap_err(self) -> T { unwrap(self) }
pure fn unwrap_err(self) -> E { unwrap_err(self) }
#[inline(always)]
pure fn chain<U>(self, op: fn(T) -> Result<U,E>) -> Result<U,E> {