mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +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,7 +1,7 @@
|
|||
use std::{collections::HashMap, path::Path, str};
|
||||
use std::{path::Path, str};
|
||||
|
||||
use memofs::{IoResultExt, Vfs};
|
||||
use rbx_dom_weak::types::Enum;
|
||||
use rbx_dom_weak::{types::Enum, ustr, HashMapExt as _, UstrMap};
|
||||
|
||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||
|
||||
|
|
@ -42,12 +42,12 @@ pub fn snapshot_lua(
|
|||
let contents = vfs.read_to_string_lf_normalized(path)?;
|
||||
let contents_str = contents.as_str();
|
||||
|
||||
let mut properties = HashMap::with_capacity(2);
|
||||
properties.insert("Source".to_owned(), contents_str.into());
|
||||
let mut properties = UstrMap::with_capacity(2);
|
||||
properties.insert(ustr("Source"), contents_str.into());
|
||||
|
||||
if let Some(run_context) = run_context {
|
||||
properties.insert(
|
||||
"RunContext".to_owned(),
|
||||
ustr("RunContext"),
|
||||
Enum::from_u32(run_context.to_owned()).into(),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue