Skip to content

Commit be10ec1

Browse files
committed
Use DescError instead of miniscript::Error
1 parent f97b239 commit be10ec1

File tree

4 files changed

+74
-259
lines changed

4 files changed

+74
-259
lines changed

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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,16 @@
1717
//! The keys/hashes are automatically translated so that the tests knows how to satisfy things that don't end with !
1818
//!
1919
20-
use std::str::FromStr;
21-
use miniscript::Error;
22-
2320
use actual_rand as rand;
2421
use bitcoin::hashes::hex::ToHex;
2522
use bitcoin::hashes::{hash160, ripemd160, sha256, sha256d, Hash};
2623
use bitcoin::secp256k1;
2724
use miniscript::descriptor::{SinglePub, SinglePubKey};
2825
use miniscript::{
29-
Descriptor, DescriptorPublicKey, Miniscript, ScriptContext, TranslatePk, Translator,
26+
Descriptor, DescriptorPublicKey, Error, Miniscript, ScriptContext, TranslatePk, Translator,
3027
};
3128
use rand::RngCore;
32-
29+
use std::str::FromStr;
3330
#[derive(Clone, Debug)]
3431
pub struct PubData {
3532
pub pks: Vec<bitcoin::PublicKey>,
@@ -249,7 +246,10 @@ impl<'a> Translator<String, DescriptorPublicKey, ()> for StrTranslatorLoose<'a>
249246

250247
#[allow(dead_code)]
251248
// 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> {
249+
pub fn parse_test_desc(
250+
desc: &str,
251+
pubdata: &PubData,
252+
) -> Result<Descriptor<DescriptorPublicKey>, Error> {
253253
let desc = subs_hash_frag(desc, pubdata);
254254
let desc = Descriptor::<String>::from_str(&desc)?;
255255
let mut translator = StrDescPubKeyTranslator(0, pubdata);

0 commit comments

Comments
 (0)