conflicts: make materialize_merge_result() accept reference type

Because the output of diff.hunks() is a list of [&BStr]s, a Merge object
reconstructed from a diff hunk will be Merge<&BStr>. I'm not pretty sure if
we'll implement conflict diffs in that way, but this change should be harmless
anyway.
This commit is contained in:
Yuya Nishihara 2024-08-19 13:45:10 +09:00
parent 2aa913b035
commit 4cdead34b4

View file

@ -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);