Skip to content

Commit

Permalink
chore: satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEdward162 committed Dec 9, 2023
1 parent 65d69e3 commit 2d3f568
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/quickjs-wasm-rs/src/js_binding/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ static CALLBACK_CLASS_ID: Lazy<JSClassID> = Lazy::new(|| {
class_id
});

type DynCallback =
dyn FnMut(*mut JSContext, JSValueRaw, c_int, *mut JSValueRaw) -> JSValueRaw + 'static;
/// Represents a Rust callback function that can be called from JavaScript.
pub struct Callback(
Box<
RefCell<
dyn FnMut(*mut JSContext, JSValueRaw, c_int, *mut JSValueRaw) -> JSValueRaw + 'static,
>,
>,
);
pub struct Callback(Box<RefCell<DynCallback>>);
impl Callback {
/// Custom class id.
fn class_id() -> JSClassID {
Expand Down

0 comments on commit 2d3f568

Please sign in to comment.