From 29b421148438ea17418de6081154d9c688eec527 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 11 Jan 2024 22:02:10 -0800 Subject: [PATCH] limit stupid bs --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 47ae393..9c5ab7d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -447,12 +447,12 @@ fn write_item(dom:&rbx_dom_weak::WeakDom,mut file:std::path::PathBuf,node:&TreeN return Ok(()) } assert!(file.set_extension("lua"),"could not set extension"); - assert!(dom.get_by_ref(node.referent).is_some_and(|item|{ + if let Some(item)=dom.get_by_ref(node.referent){ //TODO: delete disabled scripts if let Some(rbx_dom_weak::types::Variant::String(source))=item.properties.get("Source"){ - std::fs::write(file,source).is_ok() - }else{false} - }),"no string property or file failed to write"); + std::fs::write(file,source)?; + } + } }, Class::Model=>{ if !write_models{