Rename the build::Tuple struct.

The duplicate name was easily confused with the Val::Tuple type.
This commit is contained in:
Jeremy Wall 2017-07-12 20:30:52 -05:00
parent 4f18686fb8
commit bd329c6a1f

View File

@ -118,9 +118,9 @@ impl<'a> Display for Val<'a> {
} }
} }
/// Tuple defines a set of fields. /// ValueMap defines a set of values in a parsed file.
#[derive(PartialEq,Debug)] #[derive(PartialEq,Debug)]
pub struct Tuple<'a>(HashMap<&'a str, Val<'a>>); pub struct ValueMap<'a>(HashMap<&'a str, Rc<Val<'a>>>);
/// Builder parses one or more statements into a out Tuple. /// Builder parses one or more statements into a out Tuple.
pub struct Builder<'a> { pub struct Builder<'a> {
@ -130,7 +130,7 @@ pub struct Builder<'a> {
/// are keyed by the normalized import path. This acts as a cache /// are keyed by the normalized import path. This acts as a cache
/// so multiple imports of the same file don't have to be parsed /// so multiple imports of the same file don't have to be parsed
/// multiple times. /// multiple times.
assets: HashMap<&'a str, Tuple<'a>>, assets: HashMap<&'a str, ValueMap<'a>>,
/// out is our built output. /// out is our built output.
out: HashMap<&'a str, Rc<Val<'a>>>, out: HashMap<&'a str, Rc<Val<'a>>>,
} }