Skip to content

Commit

Permalink
Replace call to deprecated group_by
Browse files Browse the repository at this point in the history
  • Loading branch information
Piturnah committed Jun 19, 2024
1 parent 881ca4f commit 6f5b74b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn get_path<'a>(diff: &[&'a str]) -> Result<&'a str> {

fn get_hunks(diff: &[&str]) -> Result<Vec<String>> {
let mut hunks = Vec::new();
let hunk_groups = diff.iter().group_by(|line| line.starts_with("@@"));
let hunk_groups = diff.iter().chunk_by(|line| line.starts_with("@@"));
let mut hunk_groups = hunk_groups.into_iter();
loop {
let Some((key, mut lines)) = hunk_groups.next() else {
Expand Down

0 comments on commit 6f5b74b

Please sign in to comment.