From 64dafe5e82751f9578dce9729df01a9929dd3567 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 2 Jan 2019 20:47:29 -0500 Subject: [PATCH] clippy: unneeded borrow --- ofborg/src/tasks/githubcommentposter.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ofborg/src/tasks/githubcommentposter.rs b/ofborg/src/tasks/githubcommentposter.rs index aa92e64..61f34af 100644 --- a/ofborg/src/tasks/githubcommentposter.rs +++ b/ofborg/src/tasks/githubcommentposter.rs @@ -193,7 +193,7 @@ fn result_to_comment(result: &LegacyBuildResult) -> String { } if !result.output.is_empty() { - reply.extend(partial_log_segment(result.output.clone())); + reply.extend(partial_log_segment(&result.output)); reply.push("".to_owned()); reply.push("".to_owned()); } else { @@ -215,13 +215,13 @@ fn list_segment(name: &str, things: &[String]) -> Vec { reply } -fn partial_log_segment(output: Vec) -> Vec { +fn partial_log_segment(output: &[String]) -> Vec { let mut reply: Vec = vec![]; reply.push("
Partial log (click to expand)

".to_owned()); reply.push("".to_owned()); reply.push("```".to_owned()); - reply.extend(output.clone()); + reply.extend(output.to_vec()); reply.push("```".to_owned()); reply.push("

".to_owned());