Skip to content

Commit d0da327

Browse files
committed
Merge #801: Fix: make StaticDebugAndDisplay Send and Sync
ea5b955 doc: fix ParseError::RelativeLockTime doc-comment (Chris Ricketts) cd4ace2 fix: make StaticDebugAndDisplay Send & Sync (Chris Ricketts) Pull request description: Fixes #800 ACKs for top commit: apoelstra: ACK ea5b955; successfully ran local tests Tree-SHA512: 435dac54470272919ac22d79b4c3acdadb7ff0f830f7082b657ae8a9dbfe8ffc22e1334555a478ebb3b5bc6d4bf8e9a9e023af6947f6582d7c7fadf1cc18b1ae
2 parents 67ebf2d + ea5b955 commit d0da327

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/blanket_traits.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ use core::{fmt, hash};
1717

1818
use crate::MiniscriptKey;
1919

20-
/// Auxiliary trait indicating that a type implements both `Debug` and `Display`.
21-
pub trait StaticDebugAndDisplay: fmt::Debug + fmt::Display + 'static {}
20+
/// Auxiliary trait indicating that a type implements both `Debug`, `Display`, `Send` and `Sync`.
21+
// NOTE: `Send` / `Sync` is required to maintain compatibility with downstream error handling libraries.
22+
pub trait StaticDebugAndDisplay: fmt::Debug + fmt::Display + Send + Sync + 'static {}
2223

23-
impl<T: fmt::Debug + fmt::Display + 'static> StaticDebugAndDisplay for T {}
24+
impl<T: fmt::Debug + fmt::Display + Send + Sync + 'static> StaticDebugAndDisplay for T {}
2425

2526
/// Blanket trait describing a key where all associated types implement `FromStr`,
2627
/// and all `FromStr` errors can be displayed.

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::Box;
1818
pub enum ParseError {
1919
/// Invalid absolute locktime
2020
AbsoluteLockTime(AbsLockTimeError),
21-
/// Invalid absolute locktime
21+
/// Invalid relative locktime
2222
RelativeLockTime(RelLockTimeError),
2323
/// Failed to parse a public key or hash.
2424
///

0 commit comments

Comments
 (0)