feat(napi) implement From<Infallible>
for napi::Error
This commit is contained in:
parent
56e71a76d3
commit
5cdfc8cb7e
1 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,12 @@ unsafe impl Sync for Error {}
|
|||
|
||||
impl error::Error for Error {}
|
||||
|
||||
impl From<std::convert::Infallible> for Error {
|
||||
fn from(_: std::convert::Infallible) -> Self {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "serde-json")]
|
||||
impl ser::Error for Error {
|
||||
fn custom<T: Display>(msg: T) -> Self {
|
||||
|
|
Loading…
Reference in a new issue