diff --git a/src/syncback/snapshot.rs b/src/syncback/snapshot.rs index 220caa1f..954630a9 100644 --- a/src/syncback/snapshot.rs +++ b/src/syncback/snapshot.rs @@ -371,19 +371,7 @@ pub fn filter_out_property(inst: &Instance, prop_name: &str) -> bool { } pub fn inst_path(dom: &WeakDom, referent: Ref) -> String { - let mut path = Vec::new(); - - let mut inst = dom.get_by_ref(referent); - while let Some(instance) = inst { - path.push(instance.name.as_str()); - inst = dom.get_by_ref(instance.parent()); - } - // This is to avoid the root's name from appearing in the path. Not - // optimal, but should be fine. - path.pop(); - - path.reverse(); - path.join("/") + dom.full_path_of(referent, "/") } #[cfg(test)]