Finish off bulk of metadata tracking in snapshot system

This commit is contained in:
Lucien Greathouse
2019-09-09 15:04:57 -07:00
parent 47ee8d54a8
commit 3e759b3e8e
5 changed files with 115 additions and 46 deletions

View File

@@ -121,11 +121,8 @@ pub fn build(options: &BuildOptions) -> Result<(), BuildError> {
// Place files don't contain an entry for the DataModel, but our
// RbxTree representation does.
let top_level_ids = tree
.get_instance(root_id)
.unwrap()
.instance
.get_children_ids();
let root_instance = tree.get_instance(root_id).unwrap();
let top_level_ids = root_instance.children();
rbx_xml::to_writer(&mut file, tree.inner(), top_level_ids, xml_encode_config())?;
}
@@ -137,11 +134,8 @@ pub fn build(options: &BuildOptions) -> Result<(), BuildError> {
log::warn!("Using the XML place format (rbxlx) is recommended instead.");
log::warn!("For more info, see https://github.com/LPGhatguy/rojo/issues/180");
let top_level_ids = tree
.get_instance(root_id)
.unwrap()
.instance
.get_children_ids();
let root_instance = tree.get_instance(root_id).unwrap();
let top_level_ids = root_instance.children();
rbx_binary::encode(tree.inner(), top_level_ids, &mut file)?;
}