Fix clippy "unnecessary Vec::push" lints
This commit is contained in:
parent
00c3ad5d8e
commit
494a5130c1
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue