firefish/packages/backend-rs/src/macros.rs
2024-01-31 19:32:56 +09:00

10 lines
252 B
Rust

#[macro_export]
macro_rules! impl_napi_error_from {
($a:ty) => {
impl From<$a> for napi::Error {
fn from(reason: $a) -> napi::Error {
napi::Error::from_reason(reason.to_string())
}
}
};
}