From 925786c95573af34aac2a136aea81bae0f56c7e5 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Wed, 31 Mar 2021 11:53:51 +0800 Subject: [PATCH] style: fix clippy error --- napi/src/js_values/either.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/napi/src/js_values/either.rs b/napi/src/js_values/either.rs index 93ee7fb6..d781372e 100644 --- a/napi/src/js_values/either.rs +++ b/napi/src/js_values/either.rs @@ -6,9 +6,9 @@ pub enum Either { B(B), } -impl Into> for Either { - fn into(self) -> Option { - match self { +impl From> for Option { + fn from(value: Either) -> Option { + match value { Either::A(v) => Some(v), Either::B(_) => None, }