Skip to content

Commit

Permalink
run the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante committed Aug 10, 2024
1 parent c5c8330 commit dc51c4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ expression: "String::from_utf8(output.stdout)?"
}


Processed 1 files and found 0 matches
Processed 1 files and found 1 matches
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ Log in PlaygroundPattern: Warning: sequential matches at the top of the file. If
module "test_module3" {
Processed 4 files and found 0 matches
Processed 4 files and found 4 matches
5 changes: 2 additions & 3 deletions crates/marzano_messenger/src/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ pub trait Messager: Send + Sync {
) -> anyhow::Result<bool> {
for r in execution_result {
if is_match(&r) {
if let Some(ranges) = r.get_ranges() {
details.matched += ranges.len() as i32;
}
let count = r.get_ranges().map(|ranges| ranges.len()).unwrap_or(0);
details.matched += count.max(1) as i32;
}
if let MatchResult::Rewrite(_) = r {
details.rewritten += 1;
Expand Down

0 comments on commit dc51c4f

Please sign in to comment.