diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-21 13:08:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:09:56 -0700 |
| commit | daf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch) | |
| tree | 7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/libstd/result.rs | |
| parent | 15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff) | |
| download | rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.tar.gz rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.zip | |
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/libstd/result.rs')
| -rw-r--r-- | src/libstd/result.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/result.rs b/src/libstd/result.rs index 92315b5d47a..957ba4a0438 100644 --- a/src/libstd/result.rs +++ b/src/libstd/result.rs @@ -47,7 +47,7 @@ impl<T, E: ToStr> Result<T, E> { pub fn get_ref<'a>(&'a self) -> &'a T { match *self { Ok(ref t) => t, - Err(ref e) => fail2!("called `Result::get_ref()` on `Err` value: {}", + Err(ref e) => fail!("called `Result::get_ref()` on `Err` value: {}", e.to_str()), } } @@ -108,7 +108,7 @@ impl<T, E: ToStr> Result<T, E> { pub fn unwrap(self) -> T { match self { Ok(t) => t, - Err(e) => fail2!("called `Result::unwrap()` on `Err` value: {}", + Err(e) => fail!("called `Result::unwrap()` on `Err` value: {}", e.to_str()), } } @@ -126,7 +126,7 @@ impl<T, E: ToStr> Result<T, E> { pub fn expect(self, reason: &str) -> T { match self { Ok(t) => t, - Err(_) => fail2!("{}", reason.to_owned()), + Err(_) => fail!("{}", reason.to_owned()), } } @@ -136,7 +136,7 @@ impl<T, E: ToStr> Result<T, E> { pub fn expect_err(self, reason: &str) -> E { match self { Err(e) => e, - Ok(_) => fail2!("{}", reason.to_owned()), + Ok(_) => fail!("{}", reason.to_owned()), } } @@ -571,7 +571,7 @@ mod tests { Err(2)); // test that it does not take more elements than it needs - let functions = [|| Ok(()), || Err(1), || fail2!()]; + let functions = [|| Ok(()), || Err(1), || fail!()]; assert_eq!(collect(functions.iter().map(|f| (*f)())), Err(1)); @@ -591,7 +591,7 @@ mod tests { Err(2)); // test that it does not take more elements than it needs - let functions = [|| Ok(()), || Err(1), || fail2!()]; + let functions = [|| Ok(()), || Err(1), || fail!()]; assert_eq!(fold_(functions.iter() .map(|f| (*f)())), |
