remove a panic
This commit is contained in:
parent
53d2f7a5e8
commit
cbc818bd03
14
src/main.rs
14
src/main.rs
@ -610,11 +610,19 @@ fn interactive() -> AResult<()>{
|
|||||||
replace_count+=1;
|
replace_count+=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
let script_refs = get_script_refs(&dom);
|
let script_refs = get_script_refs(&dom)
|
||||||
|
//grab the full path to the object in case it's deleted by another operation
|
||||||
|
.into_iter()
|
||||||
|
.filter_map(|referent|
|
||||||
|
dom.get_by_ref(referent)
|
||||||
|
.map(|script|
|
||||||
|
(referent,get_full_name(&dom,script))
|
||||||
|
)
|
||||||
|
).collect::<Vec<_>>();
|
||||||
|
|
||||||
//check scribb
|
//check scribb
|
||||||
let mut fail_type=Interactive::Passed;
|
let mut fail_type=Interactive::Passed;
|
||||||
for &script_ref in script_refs.iter() {
|
for (script_ref,script_full_name) in script_refs{
|
||||||
if let Some(script)=dom.get_by_ref(script_ref){
|
if let Some(script)=dom.get_by_ref(script_ref){
|
||||||
if let Some(rbx_dom_weak::types::Variant::String(source)) = script.properties.get("Source") {
|
if let Some(rbx_dom_weak::types::Variant::String(source)) = script.properties.get("Source") {
|
||||||
script_count+=1;
|
script_count+=1;
|
||||||
@ -721,7 +729,7 @@ fn interactive() -> AResult<()>{
|
|||||||
panic!("FATAL: failed to get source for {:?}",file_thing.file_name());
|
panic!("FATAL: failed to get source for {:?}",file_thing.file_name());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
panic!("FATAL: failed to get_by_ref {:?}",script_ref);
|
println!("WARNING: script was deleted: {}",script_full_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut dest=match fail_type{
|
let mut dest=match fail_type{
|
||||||
|
Loading…
Reference in New Issue
Block a user