Skip to content

Commit 9ef6607

Browse files
committed
Use DescError instead of miniscript::Error
1 parent 981a337 commit 9ef6607

File tree

5 files changed

+77
-266
lines changed

5 files changed

+77
-266
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ fuzz/hfuzz_workspace
1717

1818
#Vscode project files
1919
.vscode
20-
.metals
2120

2221
#Intergration test files
2322
integration_test/bitcoin-*

integration_test/run.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

integration_test/src/main.rs

Lines changed: 0 additions & 160 deletions
This file was deleted.

tests/setup/test_util.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@
1818
//!
1919
2020
use std::str::FromStr;
21-
use miniscript::Error;
2221

2322
use actual_rand as rand;
2423
use bitcoin::hashes::hex::ToHex;
2524
use bitcoin::hashes::{hash160, ripemd160, sha256, sha256d, Hash};
2625
use bitcoin::secp256k1;
2726
use miniscript::descriptor::{SinglePub, SinglePubKey};
2827
use miniscript::{
29-
Descriptor, DescriptorPublicKey, Miniscript, ScriptContext, TranslatePk, Translator,
28+
Descriptor, DescriptorPublicKey, Error, Miniscript, ScriptContext, TranslatePk, Translator,
3029
};
3130
use rand::RngCore;
32-
3331
#[derive(Clone, Debug)]
3432
pub struct PubData {
3533
pub pks: Vec<bitcoin::PublicKey>,
@@ -249,7 +247,10 @@ impl<'a> Translator<String, DescriptorPublicKey, ()> for StrTranslatorLoose<'a>
249247

250248
#[allow(dead_code)]
251249
// https://github.com/rust-lang/rust/issues/46379. The code is pub fn and integration test, but still shows warnings
252-
pub fn parse_test_desc(desc: &str, pubdata: &PubData) -> Result<Descriptor<DescriptorPublicKey>, Error> {
250+
pub fn parse_test_desc(
251+
desc: &str,
252+
pubdata: &PubData,
253+
) -> Result<Descriptor<DescriptorPublicKey>, Error> {
253254
let desc = subs_hash_frag(desc, pubdata);
254255
let desc = Descriptor::<String>::from_str(&desc)?;
255256
let mut translator = StrDescPubKeyTranslator(0, pubdata);

0 commit comments

Comments
 (0)