summaryrefslogtreecommitdiff
path: root/core/runtime.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/runtime.rs')
-rw-r--r--core/runtime.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/core/runtime.rs b/core/runtime.rs
index 17840a2d0..8ec3dfb08 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -2088,7 +2088,7 @@ pub mod tests {
#[test]
fn test_error_builder() {
#[op]
- fn op_err(_: &mut OpState) -> Result<(), Error> {
+ fn op_err() -> Result<(), Error> {
Err(custom_error("DOMExceptionOperationError", "abc"))
}
@@ -2533,9 +2533,7 @@ assertEquals(1, notify_return_value);
#[tokio::test]
async fn test_set_macrotask_callback_set_next_tick_callback() {
#[op]
- async fn op_async_sleep(
- _op_state: Rc<RefCell<OpState>>,
- ) -> Result<(), Error> {
+ async fn op_async_sleep() -> Result<(), Error> {
// Future must be Poll::Pending on first call
tokio::time::sleep(std::time::Duration::from_millis(1)).await;
Ok(())
@@ -2610,13 +2608,13 @@ assertEquals(1, notify_return_value);
static NEXT_TICK: AtomicUsize = AtomicUsize::new(0);
#[op]
- fn op_macrotask(_: &mut OpState) -> Result<(), AnyError> {
+ fn op_macrotask() -> Result<(), AnyError> {
MACROTASK.fetch_add(1, Ordering::Relaxed);
Ok(())
}
#[op]
- fn op_next_tick(_: &mut OpState) -> Result<(), AnyError> {
+ fn op_next_tick() -> Result<(), AnyError> {
NEXT_TICK.fetch_add(1, Ordering::Relaxed);
Ok(())
}
@@ -2747,13 +2745,13 @@ assertEquals(1, notify_return_value);
static UNCAUGHT_EXCEPTION: AtomicUsize = AtomicUsize::new(0);
#[op]
- fn op_promise_reject(_: &mut OpState) -> Result<(), AnyError> {
+ fn op_promise_reject() -> Result<(), AnyError> {
PROMISE_REJECT.fetch_add(1, Ordering::Relaxed);
Ok(())
}
#[op]
- fn op_uncaught_exception(_: &mut OpState) -> Result<(), AnyError> {
+ fn op_uncaught_exception() -> Result<(), AnyError> {
UNCAUGHT_EXCEPTION.fetch_add(1, Ordering::Relaxed);
Ok(())
}