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