From e5cca9ed041665ec8c81e93f48648f8aefd9c592 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 12 Sep 2023 19:29:43 -0700 Subject: [PATCH] common location --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index e3bf209..c1262f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -448,11 +448,11 @@ fn interactive() -> Result<(), Box>{ } }; + let location=get_full_name(&dom, script); match source_action{ - ScriptAction::Pass => println!("passed source location={}",get_full_name(&dom, script)), + ScriptAction::Pass => println!("passed source location={}",location), ScriptAction::Replace(replace_id)=>{ //replace the source - let location=get_full_name(&dom, script); if let (Some(replace_source),Some(replace_script))=(allowed_map.get(&replace_id),dom.get_by_ref_mut(script.referent())){ replace_count+=1; println!("replaced source id={} location={}",replace_id,location); @@ -462,17 +462,17 @@ fn interactive() -> Result<(), Box>{ } }, ScriptAction::Delete => { - println!("deleted source location={}",get_full_name(&dom, script)); + println!("deleted source location={}",location); replace_count+=1; dom.destroy(script.referent()); }, ScriptAction::Flag => { - println!("flagged source location={}",get_full_name(&dom, script)); + println!("flagged source location={}",location); fail_type=Interactive::Flagged; }, ScriptAction::Block => { block_count+=1; - println!("blocked source location={}",get_full_name(&dom, script)); + println!("blocked source location={}",location); match fail_type{ Interactive::Passed => fail_type=Interactive::Blocked, _=>(),