Remove unnecessary map_err's

This commit is contained in:
Kris Nuttycombe 2021-01-12 20:53:09 -07:00
parent 7acc75249b
commit fd3468b4f5
1 changed files with 2 additions and 5 deletions

View File

@ -209,8 +209,7 @@ where
let merkle_path = selected.witness.path().expect("the tree is not empty");
builder
.add_sapling_spend(extsk.clone(), selected.diversifier, note, merkle_path)
.map_err(Error::Builder)?;
.add_sapling_spend(extsk.clone(), selected.diversifier, note, merkle_path)?
}
match to {
@ -222,9 +221,7 @@ where
}?;
let consensus_branch_id = BranchId::for_height(params, height);
let (tx, tx_metadata) = builder
.build(consensus_branch_id, &prover)
.map_err(Error::Builder)?;
let (tx, tx_metadata) = builder.build(consensus_branch_id, &prover)?;
// We only called add_sapling_output() once.
let output_index = match tx_metadata.output_index(0) {