From 1493d12a221fa7fd1692aa6ddb5ceb6160a260fe Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 21 Oct 2019 03:02:11 -0700 Subject: [PATCH] Reduce unused imports --- schala-lang/language/src/eval.rs | 2 +- schala-lang/language/src/scope_resolution.rs | 1 - schala-lang/language/src/symbol_table.rs | 2 +- schala-lang/language/src/symbol_table/symbol_trie.rs | 3 +-- schala-lang/language/src/symbol_table/test.rs | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/schala-lang/language/src/eval.rs b/schala-lang/language/src/eval.rs index 403f23d..0c96451 100644 --- a/schala-lang/language/src/eval.rs +++ b/schala-lang/language/src/eval.rs @@ -8,7 +8,7 @@ use itertools::Itertools; use crate::util::ScopeStack; use crate::reduced_ast::{BoundVars, ReducedAST, Stmt, Expr, Lit, Func, Alternative, Subpattern}; -use crate::symbol_table::{SymbolSpec, Symbol, SymbolTable, ScopeSegment, FullyQualifiedSymbolName}; +use crate::symbol_table::{SymbolSpec, Symbol, SymbolTable, FullyQualifiedSymbolName}; use crate::builtin::Builtin; mod test; diff --git a/schala-lang/language/src/scope_resolution.rs b/schala-lang/language/src/scope_resolution.rs index 89b1158..69f5294 100644 --- a/schala-lang/language/src/scope_resolution.rs +++ b/schala-lang/language/src/scope_resolution.rs @@ -5,7 +5,6 @@ use crate::ast::*; use crate::util::ScopeStack; type FQSNPrefix = Vec; -type NameScopeStack<'t> = ScopeStack<'t, Rc, FQSNPrefix>; pub struct ScopeResolver<'a> { symbol_table: &'a mut SymbolTable, diff --git a/schala-lang/language/src/symbol_table.rs b/schala-lang/language/src/symbol_table.rs index edf8794..0566b3c 100644 --- a/schala-lang/language/src/symbol_table.rs +++ b/schala-lang/language/src/symbol_table.rs @@ -15,7 +15,7 @@ macro_rules! fqsn { { let mut vec = vec![]; $( - vec.push(ScopeSegment::new(Rc::new($name.to_string()))); + vec.push(crate::symbol_table::ScopeSegment::new(std::rc::Rc::new($name.to_string()))); )* FullyQualifiedSymbolName(vec) } diff --git a/schala-lang/language/src/symbol_table/symbol_trie.rs b/schala-lang/language/src/symbol_table/symbol_trie.rs index d5690da..4e7176a 100644 --- a/schala-lang/language/src/symbol_table/symbol_trie.rs +++ b/schala-lang/language/src/symbol_table/symbol_trie.rs @@ -1,6 +1,5 @@ -use std::rc::Rc; use radix_trie::{Trie, TrieCommon, TrieKey}; -use super::{ScopeSegment, FullyQualifiedSymbolName}; +use super::FullyQualifiedSymbolName; use std::hash::{Hasher, Hash}; use std::collections::hash_map::DefaultHasher; diff --git a/schala-lang/language/src/symbol_table/test.rs b/schala-lang/language/src/symbol_table/test.rs index a620e2f..f506702 100644 --- a/schala-lang/language/src/symbol_table/test.rs +++ b/schala-lang/language/src/symbol_table/test.rs @@ -1,6 +1,5 @@ #![cfg(test)] -#[macro_use] use super::*; use crate::util::quick_ast;