Skip to content

Commit

Permalink
conflicts: make materialize_merge_result() accept reference type
Browse files Browse the repository at this point in the history
Because the output of diff.hunks() is a list of [&BStr]s, a Merge object
reconstructed from a diff hunk will be Merge<&BStr>.
  • Loading branch information
yuja committed Nov 20, 2024
1 parent d244f74 commit 09d6052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/conflicts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ async fn materialize_tree_value_no_access_denied(
}
}

pub fn materialize_merge_result(
single_hunk: &Merge<BString>,
pub fn materialize_merge_result<T: AsRef<[u8]>>(
single_hunk: &Merge<T>,
output: &mut dyn Write,
) -> io::Result<()> {
let merge_result = files::merge(single_hunk);
Expand Down

0 comments on commit 09d6052

Please sign in to comment.