From: davemo88 Date: Tue, 16 Mar 2021 14:20:07 +0000 (-0400) Subject: brevity X-Git-Tag: v0.6.0~11^2 X-Git-Url: http://internal-gitweb-vhost/%22https:/parse/database/error/struct.Script.html?a=commitdiff_plain;h=e82dfa971e308a1f44569488d065e45fd8a271e9;p=bdk brevity --- diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index 6794f919..2b20da67 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -1322,14 +1322,11 @@ where ) -> Result { // Try to find the prev_script in our db to figure out if this is internal or external, // and the derivation index - let (keychain, child) = match self + let (keychain, child) = self .database .borrow() .get_path_from_script_pubkey(&utxo.txout.script_pubkey)? - { - Some(x) => x, - None => return Err(Error::UnknownUTXO), - }; + .ok_or(Error::UnknownUTXO)?; let mut psbt_input = Input { sighash_type,