diff --git a/src/main.rs b/src/main.rs index 352f8b2..9dfe3ae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -209,12 +209,12 @@ fn replace() -> Result<(), Box>{ for entry in std::fs::read_dir("maps/blocked")? { let file_thing=entry?; - let input = std::io::BufReader::new(std::fs::File::open(file_thing.path())?); + let input = std::io::BufReader::new(std::fs::File::open(file_thing.path())?); let dom = rbx_binary::from_reader(input)?; - let mut write_dom = rbx_dom_weak::WeakDom::new(rbx_dom_weak::InstanceBuilder::empty()); - dom.clone_into_external(dom.root_ref(), &mut write_dom); + let input = std::io::BufReader::new(std::fs::File::open(file_thing.path())?); + let mut write_dom = rbx_binary::from_reader(input)?; let scripts = get_scripts(dom); @@ -307,11 +307,10 @@ fn interactive() -> Result<(), Box>{ let file_thing=entry?; println!("processing map={:?}",file_thing.file_name()); let input = std::io::BufReader::new(std::fs::File::open(file_thing.path())?); - let dom = rbx_binary::from_reader(input)?; - let mut write_dom = rbx_dom_weak::WeakDom::new(rbx_dom_weak::InstanceBuilder::empty()); - dom.clone_into_external(dom.root_ref(), &mut write_dom); + let input = std::io::BufReader::new(std::fs::File::open(file_thing.path())?); + let mut write_dom = rbx_binary::from_reader(input)?; let scripts = get_scripts(dom);