about summary refs log tree commit diff
path: root/src/libstd/either.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/either.rs')
-rw-r--r--src/libstd/either.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/either.rs b/src/libstd/either.rs
index 27381f64ad4..657212fc692 100644
--- a/src/libstd/either.rs
+++ b/src/libstd/either.rs
@@ -78,7 +78,7 @@ impl<L, R> Either<L, R> {
     pub fn expect_left(self, reason: &str) -> L {
         match self {
             Left(x) => x,
-            Right(_) => fail!(reason.to_owned())
+            Right(_) => fail2!("{}", reason.to_owned())
         }
     }
 
@@ -94,7 +94,7 @@ impl<L, R> Either<L, R> {
     pub fn expect_right(self, reason: &str) -> R {
         match self {
             Right(x) => x,
-            Left(_) => fail!(reason.to_owned())
+            Left(_) => fail2!("{}", reason.to_owned())
         }
     }