mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Remove ownership stuff from InstanceSnapshot
This commit is contained in:
parent
72342f3118
commit
f32cb592e2
1 changed files with 0 additions and 17 deletions
|
|
@ -38,23 +38,6 @@ pub struct InstanceSnapshot<'source> {
|
|||
}
|
||||
|
||||
impl<'source> InstanceSnapshot<'source> {
|
||||
pub fn get_owned(&'source self) -> InstanceSnapshot<'static> {
|
||||
let children: Vec<InstanceSnapshot<'static>> = self
|
||||
.children
|
||||
.iter()
|
||||
.map(InstanceSnapshot::get_owned)
|
||||
.collect();
|
||||
|
||||
InstanceSnapshot {
|
||||
snapshot_id: None,
|
||||
metadata: self.metadata.clone(),
|
||||
name: Cow::Owned(self.name.clone().into_owned()),
|
||||
class_name: Cow::Owned(self.class_name.clone().into_owned()),
|
||||
properties: self.properties.clone(),
|
||||
children,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_tree(tree: &RbxTree, id: RbxId) -> InstanceSnapshot<'static> {
|
||||
let instance = tree
|
||||
.get_instance(id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue