Cleanup warnings.

This commit is contained in:
Jeremy Wall 2017-07-29 13:02:47 -05:00
parent 0453a6043d
commit c00306337b
2 changed files with 3 additions and 7 deletions

View File

@ -287,7 +287,7 @@ impl Builder {
if it.peek().is_none() {
return Ok(v.clone());
}
if let &Val::Tuple(ref fs) = v.as_ref() {
if let &Val::Tuple(_) = v.as_ref() {
let mut stack = VecDeque::new();
stack.push_back(v.clone());
loop {
@ -448,7 +448,7 @@ impl Builder {
for (key, val) in fields.drain(0..) {
let expr_result = try!(self.eval_expr(val));
match m.entry(key.clone()) {
Entry::Vacant(mut v) => {
Entry::Vacant(v) => {
v.insert(expr_result);
},
Entry::Occupied(mut v) => {
@ -571,7 +571,7 @@ impl Builder {
if !self.files.contains(&val) { // Only parse the file once on import.
if self.assets.get(&sym).is_none() {
let mut b = Self::new();
b.build_file(&val);
try!(b.build_file(&val));
let fields: Vec<(String, Rc<Val>)> = b.out.drain().collect();
let result = Rc::new(Val::Tuple(fields));
self.assets.entry(sym).or_insert(result.clone());

View File

@ -387,10 +387,6 @@ named!(copy_expression<Expression>,
)
);
fn value_to_string(v: Value) -> String {
v.to_string()
}
fn tuple_to_macro(mut t: (Vec<Value>, Value)) -> ParseResult<Expression> {
match t.1 {
Value::Tuple(v) => {