Skip to content

Commit b13e187

Browse files
committed
Rename Bare to BareCtx
1 parent fea9455 commit b13e187

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/descriptor/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use policy;
4444
use push_opcode_size;
4545
use script_num_size;
4646
use util::witness_to_scriptsig;
47-
use Bare;
47+
use BareCtx;
4848
use Error;
4949
use MiniscriptKey;
5050
use Satisfier;
@@ -70,7 +70,7 @@ pub type KeyMap = HashMap<DescriptorPublicKey, DescriptorSecretKey>;
7070
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
7171
pub enum Descriptor<Pk: MiniscriptKey> {
7272
/// A raw scriptpubkey (including pay-to-pubkey) under Legacy context
73-
Bare(Miniscript<Pk, Bare>),
73+
Bare(Miniscript<Pk, BareCtx>),
7474
/// Pay-to-Pubkey
7575
Pk(Pk),
7676
/// Pay-to-PubKey-Hash
@@ -766,7 +766,7 @@ where
766766
}
767767
_ => {
768768
let sub = Miniscript::from_tree(&top)?;
769-
Bare::top_level_checks(&sub)?;
769+
BareCtx::top_level_checks(&sub)?;
770770
Ok(Descriptor::Bare(sub))
771771
}
772772
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ use bitcoin::hashes::{hash160, sha256, Hash};
130130

131131
pub use descriptor::{Descriptor, DescriptorPublicKey, DescriptorPublicKeyCtx};
132132
pub use interpreter::Interpreter;
133-
pub use miniscript::context::{Bare, Legacy, ScriptContext, Segwitv0};
133+
pub use miniscript::context::{BareCtx, Legacy, ScriptContext, Segwitv0};
134134
pub use miniscript::decode::Terminal;
135135
pub use miniscript::satisfy::{BitcoinSig, Satisfier};
136136
pub use miniscript::Miniscript;

src/miniscript/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,9 @@ impl ScriptContext for Segwitv0 {
396396
/// In general, it is not recommended to use Bare descriptors
397397
/// as they as strongly limited by standardness policies.
398398
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)]
399-
pub enum Bare {}
399+
pub enum BareCtx {}
400400

401-
impl ScriptContext for Bare {
401+
impl ScriptContext for BareCtx {
402402
fn check_terminal_non_malleable<Pk: MiniscriptKey, Ctx: ScriptContext>(
403403
_frag: &Terminal<Pk, Ctx>,
404404
) -> Result<(), ScriptContextError> {
@@ -499,12 +499,12 @@ impl ScriptContext for NoChecks {
499499

500500
/// Private Mod to prevent downstream from implementing this public trait
501501
mod private {
502-
use super::{Bare, Legacy, NoChecks, Segwitv0};
502+
use super::{BareCtx, Legacy, NoChecks, Segwitv0};
503503

504504
pub trait Sealed {}
505505

506506
// Implement for those same types, but no others.
507-
impl Sealed for Bare {}
507+
impl Sealed for BareCtx {}
508508
impl Sealed for Legacy {}
509509
impl Sealed for Segwitv0 {}
510510
impl Sealed for NoChecks {}

src/miniscript/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::{fmt, str};
3030
use bitcoin;
3131
use bitcoin::blockdata::script;
3232

33-
pub use self::context::{Bare, Legacy, Segwitv0};
33+
pub use self::context::{BareCtx, Legacy, Segwitv0};
3434

3535
pub mod analyzable;
3636
pub mod astelem;

src/psbt/finalizer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use interpreter;
2727
use Descriptor;
2828
use Miniscript;
2929
use NullCtx;
30-
use {Bare, Legacy, Segwitv0};
30+
use {BareCtx, Legacy, Segwitv0};
3131
// Get the scriptpubkey for the psbt input
3232
fn get_scriptpubkey(psbt: &Psbt, index: usize) -> Result<&Script, InputError> {
3333
let script_pubkey;
@@ -192,7 +192,7 @@ fn get_descriptor(psbt: &Psbt, index: usize) -> Result<Descriptor<PublicKey>, In
192192
if inp.redeem_script.is_some() {
193193
return Err(InputError::NonEmptyRedeemScript);
194194
}
195-
let ms = Miniscript::<bitcoin::PublicKey, Bare>::parse_insane(script_pubkey)?;
195+
let ms = Miniscript::<bitcoin::PublicKey, BareCtx>::parse_insane(script_pubkey)?;
196196
Ok(Descriptor::Bare(ms))
197197
}
198198
}

0 commit comments

Comments
 (0)