Skip to content

Commit

Permalink
Add a test that make sure Error is Send + Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Sep 15, 2022
1 parent cbaefc2 commit 64d8a4b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions heed/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,16 @@ impl From<io::Error> for Error {
}

pub type Result<T> = result::Result<T, Error>;

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn error_is_send_sync() {
fn give_me_send_sync<T: Send + Sync>(_: T) {}

let error = Error::Encoding(Box::from("There is an issue, you know?"));
give_me_send_sync(error);
}
}

0 comments on commit 64d8a4b

Please sign in to comment.