mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Update rbx-dom (#1023)
This commit is contained in:
parent
0d6ff8ef8a
commit
833320de64
30 changed files with 8815 additions and 2249 deletions
|
|
@ -1,9 +1,10 @@
|
|||
//! Utiilty that helps redact nondeterministic information from trees so that
|
||||
//! they can be part of snapshot tests.
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use rbx_dom_weak::types::{Ref, Variant};
|
||||
use rbx_dom_weak::{
|
||||
types::{Ref, Variant},
|
||||
Ustr, UstrMap,
|
||||
};
|
||||
use rojo_insta_ext::RedactionMap;
|
||||
use serde::Serialize;
|
||||
|
||||
|
|
@ -34,8 +35,8 @@ pub fn intern_tree(tree: &RojoTree, redactions: &mut RedactionMap) {
|
|||
struct InstanceView {
|
||||
id: Ref,
|
||||
name: String,
|
||||
class_name: String,
|
||||
properties: HashMap<String, Variant>,
|
||||
class_name: Ustr,
|
||||
properties: UstrMap<Variant>,
|
||||
metadata: InstanceMetadata,
|
||||
children: Vec<InstanceView>,
|
||||
}
|
||||
|
|
@ -46,7 +47,7 @@ fn extract_instance_view(tree: &RojoTree, id: Ref) -> InstanceView {
|
|||
InstanceView {
|
||||
id: instance.id(),
|
||||
name: instance.name().to_owned(),
|
||||
class_name: instance.class_name().to_owned(),
|
||||
class_name: instance.class_name(),
|
||||
properties: instance.properties().clone(),
|
||||
metadata: instance.metadata().clone(),
|
||||
children: instance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue