From b058e47d799a5a2c145f01c561d942fb4107ca26 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 3 Mar 2018 00:28:52 -0800 Subject: [PATCH] Kill some compiler warnings --- src/schala_lang/eval.rs | 2 +- src/schala_lang/tokenizing.rs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/schala_lang/eval.rs b/src/schala_lang/eval.rs index c69baaa..0da8973 100644 --- a/src/schala_lang/eval.rs +++ b/src/schala_lang/eval.rs @@ -121,7 +121,7 @@ impl<'a> State<'a> { }; } }, - Binding { name, constant, expr } => { + Binding { name, expr, ..} => { let val = self.eval_expr(expr)?; self.insert(name.clone(), ValueEntry::Binding { val }); }, diff --git a/src/schala_lang/tokenizing.rs b/src/schala_lang/tokenizing.rs index dd62519..ccaf3cb 100644 --- a/src/schala_lang/tokenizing.rs +++ b/src/schala_lang/tokenizing.rs @@ -1,10 +1,8 @@ use itertools::Itertools; use std::collections::HashMap; use std::rc::Rc; -use std::iter::{Iterator, Enumerate, Peekable, FlatMap}; -use std::str::{Lines, Chars}; +use std::iter::{Iterator, Peekable}; use std::fmt; -use std::fmt::Write; #[derive(Debug, PartialEq, Clone)] pub enum TokenType { @@ -96,9 +94,6 @@ impl Token { _ => None, } } - pub fn to_string(&self) -> String { - format!("{}", self.token_type) - } pub fn to_string_with_metadata(&self) -> String { format!("{}(L:{},c:{})", self.token_type, self.offset.0, self.offset.1) }