forked from mirrors/jj
evolog: use predecessor_ids() where commit object isn't needed
This commit is contained in:
parent
25819dd1c9
commit
c3ed3e3781
1 changed files with 5 additions and 4 deletions
|
@ -142,10 +142,11 @@ pub(crate) fn cmd_evolog(
|
|||
if !args.no_graph {
|
||||
let mut graph = get_graphlog(graph_style, formatter.raw());
|
||||
for commit in commits {
|
||||
let mut edges = vec![];
|
||||
for predecessor in commit.predecessors() {
|
||||
edges.push(Edge::Direct(predecessor?.id().clone()));
|
||||
}
|
||||
let edges = commit
|
||||
.predecessor_ids()
|
||||
.iter()
|
||||
.map(|id| Edge::Direct(id.clone()))
|
||||
.collect_vec();
|
||||
let graph_width = || graph.width(commit.id(), &edges);
|
||||
let mut buffer = vec![];
|
||||
with_content_format.write_graph_text(
|
||||
|
|
Loading…
Reference in a new issue