Skip to content

Commit

Permalink
Allow column to be absent
Browse files Browse the repository at this point in the history
  • Loading branch information
anfedotoff committed Sep 22, 2023
1 parent 64bcb63 commit 6d5a171
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libcasr/src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ impl ParseStacktrace for RustStacktrace {
}

fn parse_stacktrace_entry(entry: &str) -> Result<StacktraceEntry> {
let re = Regex::new(r#" *[0-9]+: +0x([0-9a-f]+) - (.+?)(?: *at (.+):([0-9]+):([0-9]+)|$)"#)
.unwrap();
let re = Regex::new(
r#" *[0-9]+: +0x([0-9a-f]+) - (.+?)(?: *at (.+?):([0-9]+)(?::([0-9]+))?|$)"#,
)
.unwrap();
let mut stentry = StacktraceEntry::default();

let Some(caps) = re.captures(entry.as_ref()) else {
Expand Down

0 comments on commit 6d5a171

Please sign in to comment.