Skip to content

Commit 8fba5a2

Browse files
committed
chore: Make Clippy happy.
1 parent 45b7003 commit 8fba5a2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/value.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -878,15 +878,13 @@ mod tests {
878878
arguments: &[JSValue],
879879
) -> Result<JSValue, JSException> {
880880
if arguments.len() != 2 {
881-
return Err(JSException {
882-
value: JSValue::new_string(ctx, "must receive 2 arguments"),
883-
});
881+
return Err(JSValue::new_string(ctx, "must receive 2 arguments").into());
884882
}
885883

886884
let x = arguments[0].as_number()?;
887885
let y = arguments[1].as_number()?;
888886

889-
Ok(JSValue::new_number(&ctx, x + y))
887+
Ok(JSValue::new_number(ctx, x + y))
890888
}
891889

892890
let sum = JSValue::new_function(&ctx, "awesome_sum", Some(sum)).as_object()?;

sum.wasm

147 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)