diff --git a/src/build/compile_test.rs b/src/build/compile_test.rs index 65186f8..2cbfc25 100644 --- a/src/build/compile_test.rs +++ b/src/build/compile_test.rs @@ -12,9 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::cell::RefCell; -use std::rc::Rc; - use regex::Regex; //TODO(jwall): use super::assets::MemoryCache; diff --git a/src/build/format.rs b/src/build/format.rs index 5ae95ce..b961961 100644 --- a/src/build/format.rs +++ b/src/build/format.rs @@ -110,7 +110,7 @@ impl ExpressionTemplate { let i = SliceIter::new(&toks); match parse::expression(i) { ParseResult::Complete(_, expr) => Ok(expr), - ParseResult::Abort(e) | ParseResult::Fail(e) => { + ParseResult::Abort(_e) | ParseResult::Fail(_e) => { panic!("TODO(jwall): make this not a thing") } ParseResult::Incomplete(_ei) => panic!("TODO(jwall): make this not a thing"), diff --git a/src/build/ir.rs b/src/build/ir.rs index aa05a00..bbbe1e3 100644 --- a/src/build/ir.rs +++ b/src/build/ir.rs @@ -6,7 +6,6 @@ use std::fmt::{Display, Formatter}; use std::rc::Rc; use std::string::ToString; -use crate::ast::*; use crate::error; /// The Intermediate representation of a compiled UCG AST. diff --git a/src/build/mod.rs b/src/build/mod.rs index d342465..afbe0d5 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -47,11 +47,6 @@ mod stdlib; pub use self::ir::Val; -enum ProcessingOpType { - Map, - Filter, -} - /// The result of a build. type BuildResult = Result<(), Box>; diff --git a/src/build/opcode/mod.rs b/src/build/opcode/mod.rs index 58a692b..eb666a1 100644 --- a/src/build/opcode/mod.rs +++ b/src/build/opcode/mod.rs @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::BTreeSet; -use std::convert::{TryFrom, TryInto}; use std::rc::Rc; mod cache; diff --git a/src/build/test.rs b/src/build/test.rs index 39ee240..f05698b 100644 --- a/src/build/test.rs +++ b/src/build/test.rs @@ -11,14 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -use super::assets; -use super::assets::MemoryCache; -use super::{FileBuilder, SelectDef, Val}; +use super::{FileBuilder, Val}; use crate::ast::*; -use crate::convert::ConverterRegistry; use std; -use std::cell::RefCell; use std::rc::Rc; fn test_expr_to_val<'a, O, E>(mut cases: Vec<(Expression, Val)>, mut b: FileBuilder<'a, O, E>) @@ -35,8 +31,6 @@ where #[should_panic(expected = "Expected Float")] fn test_eval_div_expr_fail() { let i_paths = Vec::new(); - let cache = Rc::new(RefCell::new(MemoryCache::new())); - let registry = ConverterRegistry::make_registry(); let out: Vec = Vec::new(); let err: Vec = Vec::new(); let b = FileBuilder::new(std::env::current_dir().unwrap(), &i_paths, out, err); diff --git a/src/error.rs b/src/error.rs index 679d43e..4aea57c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -108,6 +108,7 @@ impl BuildError { fn render(&self, w: &mut fmt::Formatter) -> fmt::Result { if let Some(ref pos) = self.pos { + // FIXME(jwall): we should still be printing the file here. let file = match pos.file { Some(ref pb) => pb.to_string_lossy().to_string(), None => "".to_string(), diff --git a/src/main.rs b/src/main.rs index 3003c43..c0c795b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,15 +23,12 @@ use std::error::Error; use std::fs::File; use std::io; use std::io::Read; -use std::io::{Stderr, Stdout}; use std::path::{Path, PathBuf}; use std::process; use std::rc::Rc; use ucglib::build; -use ucglib::build::assets::{Cache, MemoryCache}; -use ucglib::build::Val; -use ucglib::convert::traits; +use ucglib::build::assets::{MemoryCache}; use ucglib::convert::{ConverterRegistry, ImporterRegistry}; use ucglib::iter::OffsetStrIter; use ucglib::parse::parse;