Skip to content

Commit

Permalink
Changed type for whatever_nested to have Send + Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
zardini123 committed Apr 2, 2024
1 parent c0f516f commit 0d7792e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ macro_rules! location {
#[snafu(crate_root(crate))]
#[snafu(whatever)]
#[snafu(display("{message}"))]
#[snafu(provide(opt, ref, chain, dyn std::error::Error => source.as_deref()))]
#[snafu(provide(opt, ref, chain, dyn std::error::Error + Send + Sync => source.as_deref()))]
#[cfg(any(feature = "std", test))]
pub struct Whatever {
#[snafu(source(from(Box<dyn std::error::Error + Send + Sync>, Some)))]
Expand Down
2 changes: 1 addition & 1 deletion tests/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ mod whatever_nested {
not_a_whatever().with_whatever_context(|_| format!("Outer failure"))
}

fn not_a_whatever() -> Result<(), Box<dyn std::error::Error>> {
fn not_a_whatever() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
inner_whatever().map_err(Into::into)
}

Expand Down

0 comments on commit 0d7792e

Please sign in to comment.