fix(napi): error should be send sync conditionally (#1487)

This commit is contained in:
Hana 2023-02-14 18:58:04 +08:00 committed by GitHub
parent ec9349bb3b
commit 853f52ed1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,8 +44,8 @@ impl<S: AsRef<str>> ToNapiValue for Error<S> {
}
}
unsafe impl Send for Error {}
unsafe impl Sync for Error {}
unsafe impl<S> Send for Error<S> where S: Send + AsRef<str> {}
unsafe impl<S> Sync for Error<S> where S: Sync + AsRef<str> {}
impl error::Error for Error {}