Skip to content

Commit 754b635

Browse files
committed
Fix warnings
1 parent 85dd13c commit 754b635

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

src/descriptor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ mod tests {
921921
struct SimpleSat {
922922
sig: secp256k1::Signature,
923923
pk: bitcoin::PublicKey,
924-
};
924+
}
925925

926926
impl Satisfier<bitcoin::PublicKey> for SimpleSat {
927927
fn lookup_sig(&self, pk: &bitcoin::PublicKey) -> Option<BitcoinSig> {

src/interpreter/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl From<::Error> for Error {
103103
}
104104

105105
impl error::Error for Error {
106-
fn cause(&self) -> Option<&error::Error> {
106+
fn cause(&self) -> Option<&dyn error::Error> {
107107
match *self {
108108
Error::Secp(ref err) => Some(err),
109109
ref x => Some(x),

src/interpreter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ mod tests {
847847
height: 1002,
848848
has_errored: false,
849849
}
850-
};
850+
}
851851

852852
let pk = ms_str!("c:pk_k({})", pks[0]);
853853
let pkh = ms_str!("c:pk_h({})", pks[1].to_pubkeyhash());

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
//! ```
8888
//!
8989
//!
90-
#![allow(bare_trait_objects)]
9190
#![cfg_attr(all(test, feature = "unstable"), feature(test))]
9291
// Coding conventions
9392
#![deny(unsafe_code)]
@@ -611,7 +610,7 @@ fn errstr(s: &str) -> Error {
611610
}
612611

613612
impl error::Error for Error {
614-
fn cause(&self) -> Option<&error::Error> {
613+
fn cause(&self) -> Option<&dyn error::Error> {
615614
match *self {
616615
Error::BadPubkey(ref e) => Some(e),
617616
_ => None,

src/miniscript/types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub struct Error<Pk: MiniscriptKey, Ctx: ScriptContext> {
105105
}
106106

107107
impl<Pk: MiniscriptKey, Ctx: ScriptContext> error::Error for Error<Pk, Ctx> {
108-
fn cause(&self) -> Option<&error::Error> {
108+
fn cause(&self) -> Option<&dyn error::Error> {
109109
None
110110
}
111111

src/policy/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl error::Error for LiftError {
7373
fn description(&self) -> &str {
7474
""
7575
}
76-
fn cause(&self) -> Option<&error::Error> {
76+
fn cause(&self) -> Option<&dyn error::Error> {
7777
None
7878
}
7979
}

src/psbt/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl<'psbt, Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for PsbtInputSatisfie
261261
if seq == 0xffffffff {
262262
false
263263
} else {
264-
<Satisfier<Pk>>::check_after(&After(locktime), n)
264+
<dyn Satisfier<Pk>>::check_after(&After(locktime), n)
265265
}
266266
}
267267

@@ -277,7 +277,7 @@ impl<'psbt, Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for PsbtInputSatisfie
277277
// transaction version and sequence check
278278
false
279279
} else {
280-
<Satisfier<Pk>>::check_older(&Older(seq), n)
280+
<dyn Satisfier<Pk>>::check_older(&Older(seq), n)
281281
}
282282
}
283283

0 commit comments

Comments
 (0)