From 2a7626c75f72ed65b49baf9ec735c1a811b319f3 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 18 Jun 2017 16:50:14 -0700 Subject: [PATCH] Add a type def for lexer Result --- lexer/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lexer/src/lib.rs b/lexer/src/lib.rs index 489e029..ec6e03d 100644 --- a/lexer/src/lib.rs +++ b/lexer/src/lib.rs @@ -11,6 +11,8 @@ pub use error::Error; use chars::Lexable; +pub type Result = std::result::Result; + #[derive(Debug, Eq, PartialEq)] pub enum Token { LeftParen, RightParen, Id(String), } @@ -44,7 +46,7 @@ impl Lexer where T: Iterator { } impl Iterator for Lexer where T: Iterator { - type Item = Result; + type Item = Result; fn next(&mut self) -> Option { let mut buffer = String::new();