Skip to content

Commit cd4ace2

Browse files
fix: make StaticDebugAndDisplay Send & Sync
1 parent a39725d commit cd4ace2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
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.

0 commit comments

Comments
 (0)