From 6f5b74b26eafcdf4d92945c6ddf1c284ee53a39e Mon Sep 17 00:00:00 2001 From: Peter Hebden Date: Wed, 19 Jun 2024 22:34:03 +0100 Subject: [PATCH] Replace call to deprecated `group_by` --- src/parse.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse.rs b/src/parse.rs index 7c14c2a..f12493c 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -31,7 +31,7 @@ fn get_path<'a>(diff: &[&'a str]) -> Result<&'a str> { fn get_hunks(diff: &[&str]) -> Result> { 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 {