From 5fbc37615a0ac1b43291b0b9ecd9743418d1b16e Mon Sep 17 00:00:00 2001 From: JDSeiler Date: Sat, 21 Dec 2024 16:01:32 -0500 Subject: [PATCH] evolog: Fix clippy lints --- cli/src/commands/evolog.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cli/src/commands/evolog.rs b/cli/src/commands/evolog.rs index 7e789af2de..2a9af17393 100644 --- a/cli/src/commands/evolog.rs +++ b/cli/src/commands/evolog.rs @@ -183,12 +183,12 @@ pub(crate) fn cmd_evolog( iter_nodes.push(r.unwrap().clone()); } } else { - for n in graph_nodes.iter() { + for n in graph_nodes { iter_nodes.push(n.as_ref().unwrap().clone()); } } - for node in iter_nodes.iter() { + for node in iter_nodes { let (commit, edges) = node.clone(); let mut graphlog_edges = vec![]; for edge in edges { @@ -239,8 +239,7 @@ pub(crate) fn cmd_evolog( }; for commit in commits_iter { - with_content_format - .write(formatter, |formatter| template.format(&commit, formatter))?; + with_content_format.write(formatter, |formatter| template.format(commit, formatter))?; if let Some(renderer) = &diff_renderer { let predecessors: Vec<_> = commit.predecessors().try_collect()?; let width = ui.term_width(); @@ -248,7 +247,7 @@ pub(crate) fn cmd_evolog( ui, formatter, &predecessors, - &commit, + commit, &EverythingMatcher, width, )?;