From 38b9b5b69582260df1a8ac205a09c717a4340810 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 30 Oct 2014 00:25:09 -0400 Subject: [PATCH] fail -> panic --- src/lex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lex.rs b/src/lex.rs index 2529b1f..a07a0e5 100644 --- a/src/lex.rs +++ b/src/lex.rs @@ -144,7 +144,7 @@ impl<'a> Iterator for Lexer<'a> { self.next_word().map(|buf| { match String::from_utf8(buf) { Ok(s) => s, - Err(_) => fail!("Lex error: Invalid utf8 on line {}.", self.current_line_number), + Err(_) => panic!("Lex error: Invalid utf8 on line {}.", self.current_line_number), } }) }