ok/jj
1
0
Fork 0
forked from mirrors/jj

op diff: pass DiffRenderer in to show_op_diff() by reference

show_op_diff() doesn't need an ownership of renderer.
This commit is contained in:
Yuya Nishihara 2024-09-05 18:49:58 +09:00
parent 5bff5cdef0
commit b7caaf586b
2 changed files with 3 additions and 3 deletions

View file

@ -160,7 +160,7 @@ pub fn cmd_op_diff(
&commit_summary_template,
(!args.no_graph).then_some(graph_style),
&with_content_format,
diff_renderer,
diff_renderer.as_ref(),
)
}
@ -178,7 +178,7 @@ pub fn show_op_diff(
commit_summary_template: &TemplateRenderer<Commit>,
graph_style: Option<GraphStyle>,
with_content_format: &LogContentFormat,
diff_renderer: Option<DiffRenderer>,
diff_renderer: Option<&DiffRenderer>,
) -> Result<(), CommandError> {
let changes = compute_operation_commits_diff(current_repo, from_repo, to_repo)?;

View file

@ -93,6 +93,6 @@ pub fn cmd_op_show(
&commit_summary_template,
(!args.no_graph).then_some(graph_style),
&with_content_format,
diff_renderer,
diff_renderer.as_ref(),
)
}