Skip to content

Commit

Permalink
Merge pull request #13 from breezy-team/older-lazy-regex
Browse files Browse the repository at this point in the history
Support older lazy-regex
  • Loading branch information
jelmer authored Jul 29, 2024
2 parents 5b7cc50 + 0594cac commit 0b97a8c
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 93 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/ed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ pub enum EdHunk {
}

pub fn parse_hunk_header(line: &[u8]) -> Option<(char, usize, usize)> {
let cap = lazy_regex::regex!("(\\d+)([adc])(\\d+)\n"B).captures(line)?;
let cap = lazy_regex::BytesRegex::new("(\\d+)([adc])(\\d+)\n")
.unwrap()
.captures(line)?;

let start = std::str::from_utf8(cap.get(1).unwrap().as_bytes())
.ok()?
Expand Down
Loading

0 comments on commit 0b97a8c

Please sign in to comment.