From 58b937521f3e459089c0d475551bf9a49f930657 Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Fri, 8 May 2026 15:25:55 +0300 Subject: Fold unclosed string error into Token variant UnclosedString was the only error variant, making lexer::Error redundant. Also removes Result from the Iterator impl. --- compiler/src/lexer/error.rs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 compiler/src/lexer/error.rs (limited to 'compiler/src/lexer/error.rs') diff --git a/compiler/src/lexer/error.rs b/compiler/src/lexer/error.rs deleted file mode 100644 index f251167..0000000 --- a/compiler/src/lexer/error.rs +++ /dev/null @@ -1,18 +0,0 @@ -use std::{error, fmt, result}; - -pub type Result = result::Result; - -#[derive(Debug, PartialEq, Eq)] -pub enum Error { - UnclosedString, -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - Error::UnclosedString => write!(f, "unclosed string literal"), - } - } -} - -impl error::Error for Error {} -- cgit v1.3