Skip to content

Commit 8b75878

Browse files
committed
Bound Error::Downstream implements Send + Sync
1 parent 309fc7c commit 8b75878

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spdlog/src/error.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub enum Error {
113113
/// variants should be used first, this variant should only be used as a
114114
/// last option when other variant types are incompatible.
115115
#[error("{0}")]
116-
Downstream(Box<dyn StdError>),
116+
Downstream(Box<dyn StdError + Send + Sync>),
117117

118118
/// Returned when multiple errors occurred.
119119
#[error("{0:?}")]
@@ -363,6 +363,12 @@ impl fmt::Debug for ErrorHandler {
363363
#[cfg(test)]
364364
mod tests {
365365
use super::*;
366+
use crate::test_utils::*;
367+
368+
#[test]
369+
fn error_traits() {
370+
assert_trait!(Error: Send + Sync);
371+
}
366372

367373
#[test]
368374
fn push_err() {

0 commit comments

Comments
 (0)