Kill some compiler warnings

This commit is contained in:
greg 2018-03-03 00:28:52 -08:00
parent 5be53dc847
commit b058e47d79
2 changed files with 2 additions and 7 deletions

View File

@ -121,7 +121,7 @@ impl<'a> State<'a> {
}; };
} }
}, },
Binding { name, constant, expr } => { Binding { name, expr, ..} => {
let val = self.eval_expr(expr)?; let val = self.eval_expr(expr)?;
self.insert(name.clone(), ValueEntry::Binding { val }); self.insert(name.clone(), ValueEntry::Binding { val });
}, },

View File

@ -1,10 +1,8 @@
use itertools::Itertools; use itertools::Itertools;
use std::collections::HashMap; use std::collections::HashMap;
use std::rc::Rc; use std::rc::Rc;
use std::iter::{Iterator, Enumerate, Peekable, FlatMap}; use std::iter::{Iterator, Peekable};
use std::str::{Lines, Chars};
use std::fmt; use std::fmt;
use std::fmt::Write;
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, PartialEq, Clone)]
pub enum TokenType { pub enum TokenType {
@ -96,9 +94,6 @@ impl Token {
_ => None, _ => None,
} }
} }
pub fn to_string(&self) -> String {
format!("{}", self.token_type)
}
pub fn to_string_with_metadata(&self) -> String { pub fn to_string_with_metadata(&self) -> String {
format!("{}(L:{},c:{})", self.token_type, self.offset.0, self.offset.1) format!("{}(L:{},c:{})", self.token_type, self.offset.0, self.offset.1)
} }