style(napi): clippy fix (#1815)
This commit is contained in:
parent
9d62db47e8
commit
6a1943ba54
2 changed files with 4 additions and 6 deletions
|
@ -41,12 +41,10 @@ impl ToTypeDef for NapiImpl {
|
||||||
self.name.to_string(),
|
self.name.to_string(),
|
||||||
if resolved_type == "undefined" {
|
if resolved_type == "undefined" {
|
||||||
"void".to_owned()
|
"void".to_owned()
|
||||||
|
} else if is_optional {
|
||||||
|
format!("{} | null", resolved_type)
|
||||||
} else {
|
} else {
|
||||||
if is_optional {
|
resolved_type
|
||||||
format!("{} | null", resolved_type)
|
|
||||||
} else {
|
|
||||||
resolved_type
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,7 +34,7 @@ impl ToNapiValue for &String {
|
||||||
impl ToNapiValue for String {
|
impl ToNapiValue for String {
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn to_napi_value(env: sys::napi_env, val: Self) -> Result<sys::napi_value> {
|
unsafe fn to_napi_value(env: sys::napi_env, val: Self) -> Result<sys::napi_value> {
|
||||||
#[allow(clippy::needless_borrow)]
|
#[allow(clippy::needless_borrows_for_generic_args)]
|
||||||
unsafe {
|
unsafe {
|
||||||
ToNapiValue::to_napi_value(env, &val)
|
ToNapiValue::to_napi_value(env, &val)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue