Fix build errors on latest nightly

This commit is contained in:
Jonathan Turner
2019-11-18 16:12:37 +13:00
parent c04da4c232
commit 372f6c16b3
5 changed files with 48 additions and 20 deletions

View File

@ -6,18 +6,24 @@ use crate::parser::{
};
use crate::prelude::*;
use crate::TaggedDictBuilder;
use derive_new::new;
use indexmap::IndexMap;
use log::trace;
use std::fmt;
#[derive(new)]
pub struct Scope {
it: Tagged<Value>,
#[new(default)]
vars: IndexMap<String, Tagged<Value>>,
}
impl Scope {
pub fn new(it: Tagged<Value>) -> Scope {
Scope {
it,
vars: IndexMap::new(),
}
}
}
impl fmt::Display for Scope {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_map()