Remove explicit Send+Sync impl for Error.

master
Andreas Fackler 7 years ago committed by Marc Brinkmann
parent d9da30835f
commit 90f63e34e9
  1. 16
      src/error.rs

@ -11,8 +11,18 @@ pub enum Error {
DegreeTooHigh, DegreeTooHigh,
} }
unsafe impl Send for Error {}
unsafe impl Sync for Error {}
/// A crypto result. /// A crypto result.
pub type Result<T> = ::std::result::Result<T, Error>; pub type Result<T> = ::std::result::Result<T, Error>;
#[cfg(test)]
mod tests {
use super::Error;
/// No-op function that compiles only if its argument is `Send + Sync`.
fn is_send_and_sync<T: Send + Sync>(_: T) {}
#[test]
fn errors_are_send_and_sync() {
is_send_and_sync(Error::NotEnoughShares);
}
}

Loading…
Cancel
Save