diff --git a/src/callable.rs b/src/callable.rs index 6431a96..f7ce249 100644 --- a/src/callable.rs +++ b/src/callable.rs @@ -3,7 +3,7 @@ use std::{cell::RefCell, fmt::Display, rc::Rc}; use crate::{ ast::Stmt, environment::Environment, - interpreter::{execute_block, InterpreterEnvironment, InterpreterSignal, RuntimeError}, + interpreter::{execute_block, InterpreterEnvironment, InterpreterSignal}, token::{LiteralType, Token}, }; diff --git a/src/environment.rs b/src/environment.rs index 6311347..108f0da 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -1,9 +1,6 @@ use std::{cell::RefCell, collections::HashMap, rc::Rc}; -use crate::{ - callable::Callable, - token::{LiteralType, Token}, -}; +use crate::token::{LiteralType, Token}; #[derive(Debug, Clone)] pub struct Environment { diff --git a/src/main.rs b/src/main.rs index cdefaef..d25ce1b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,7 @@ fn main() -> ExitCode { return ExitCode::from(75); } - if let Err(RunError::RuntimeError(r)) = result { + if let Err(RunError::RuntimeError(_r)) = result { return ExitCode::from(70); } diff --git a/src/printer.rs b/src/printer.rs index 2d394a0..cc1bfcc 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -1,5 +1,6 @@ use crate::{ast::Expr, token::LiteralType}; +#[allow(dead_code)] pub fn pretty_print(expr: &Expr) -> String { match expr { Expr::Binary { left, op, right } => parenthesize(&op.lexeme, &[left, right]), diff --git a/src/scanner.rs b/src/scanner.rs index a511f63..b1f83a5 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -72,6 +72,7 @@ impl Scanner { Ok(&self.tokens) } + #[allow(dead_code)] fn is_at_end(&self) -> bool { self.current >= self.source.len() }