Skip to content

Commit

Permalink
Fix clippy::vec_init_then_push lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Enselic authored and sharkdp committed Mar 1, 2022
1 parent b20acfd commit b1627d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,10 @@ impl<'a> Collector for CommandOutput<'a> {

result.trim_end_inplace();

let mut concat = vec![];
concat.push(ReportEntry::Code(Code {
let mut concat = vec![ReportEntry::Code(Code {
language: None,
code: result,
}));
})];

if !output.status.success() {
concat.push(ReportEntry::Text(format!(
Expand Down

0 comments on commit b1627d9

Please sign in to comment.