style: apply clippy fix (#1953)

This commit is contained in:
LongYinan 2024-02-17 14:12:24 +08:00 committed by GitHub
parent 6aae4bac0f
commit 20e0983288
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View file

@ -405,12 +405,10 @@ impl NapiFn {
syn::Type::Reference(syn::TypeReference {
lifetime: Some(lifetime),
..
}) => {
return Err(Diagnostic::span_error(
lifetime.span(),
"lifetime is not allowed in napi function arguments",
));
}
}) => Err(Diagnostic::span_error(
lifetime.span(),
"lifetime is not allowed in napi function arguments",
)),
syn::Type::Reference(syn::TypeReference {
mutability: Some(_),
elem,

View file

@ -49,7 +49,7 @@ pub fn create_reference_on_function(env: Env, cb: Function<(), ()>) -> Result<Js
Ok(())
},
move |env, _| {
let cb = reference.borrow_back(&env)?;
let cb = reference.borrow_back(env)?;
cb.call(())?;
Ok(())
},