Fix clippy "unnecessary Vec::push" lints

This commit is contained in:
teor 2021-01-22 13:57:49 +10:00 committed by Jane Lusby
parent 00c3ad5d8e
commit 494a5130c1
2 changed files with 4 additions and 6 deletions

View File

@ -393,8 +393,7 @@ fn founders_reward_validation_failure() -> Result<(), Report> {
.unwrap();
// Build new block
let mut transactions: Vec<Arc<zebra_chain::transaction::Transaction>> = Vec::new();
transactions.push(Arc::new(tx));
let transactions: Vec<Arc<zebra_chain::transaction::Transaction>> = vec![Arc::new(tx)];
let block = Block {
header: block.header,
transactions,

View File

@ -122,14 +122,13 @@ where
let default_config_path = path.join("zebrad.toml");
if default_config_path.exists() {
let mut extra_args: Vec<_> = Vec::new();
extra_args.push("-c");
extra_args.push(
let mut extra_args: Vec<_> = vec![
"-c",
default_config_path
.as_path()
.to_str()
.expect("Path is valid Unicode"),
);
];
extra_args.extend_from_slice(args);
self.spawn_child_with_command(env!("CARGO_BIN_EXE_zebrad"), &extra_args)
} else {