mirror of
https://github.com/napi-rs/napi-rs.git
synced 2026-02-01 16:41:24 +00:00
Merge pull request #520 from napi-rs/fix-clippy
style: fix clippy error
This commit is contained in:
commit
3e239f69b2
@ -6,9 +6,9 @@ pub enum Either<A: NapiValue, B: NapiValue> {
|
||||
B(B),
|
||||
}
|
||||
|
||||
impl<T: NapiValue> Into<Option<T>> for Either<T, JsUndefined> {
|
||||
fn into(self) -> Option<T> {
|
||||
match self {
|
||||
impl<T: NapiValue> From<Either<T, JsUndefined>> for Option<T> {
|
||||
fn from(value: Either<T, JsUndefined>) -> Option<T> {
|
||||
match value {
|
||||
Either::A(v) => Some(v),
|
||||
Either::B(_) => None,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user