Skip to content

Commit

Permalink
fix: Debug representation of escape_debug
Browse files Browse the repository at this point in the history
Print the result of `escape_debug` normally, else we print the underlying, entire object
  • Loading branch information
alexpovel committed Mar 21, 2024
1 parent 21b8dde commit dfc2e09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scoping/regex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Scoper for Regex {
.expect("Entered iterator of matches, but zeroth (whole) match missing")
.expect("First element guaranteed to be non-None (whole match)");
trace!(
"Overall match: {:?} ({}..{})",
"Overall match: '{}' from index {} to {}",
overall_match.as_str().escape_debug(),
overall_match.start(),
overall_match.end()
Expand All @@ -79,7 +79,7 @@ impl Scoper for Regex {
let mut subranges = Vec::new();
for group in it.flatten() {
trace!(
"Group match: {:?} ({}..{})",
"Group match: '{}' from index {} to {}",
group.as_str().escape_debug(),
group.start(),
group.end()
Expand Down

0 comments on commit dfc2e09

Please sign in to comment.