diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2022-03-14 23:38:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 23:38:53 +0100 |
commit | 88d0f01948b68f4a4d87e02a5138e94ac0a6eaea (patch) | |
tree | 2b50e5d2c6990c94f47e604281f3557b3efd9736 /ext/web/timers.rs | |
parent | 9f494dc405afc4b1b29fa4c813bd5751f26aaa36 (diff) |
feat(ops): custom arity (#13949)
Also cleanup & drop ignored wildcard op-args
Diffstat (limited to 'ext/web/timers.rs')
-rw-r--r-- | ext/web/timers.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/ext/web/timers.rs b/ext/web/timers.rs index 9a78240f7..670df3582 100644 --- a/ext/web/timers.rs +++ b/ext/web/timers.rs @@ -28,11 +28,7 @@ pub type StartTime = Instant; // If the High precision flag is not set, the // nanoseconds are rounded on 2ms. #[op] -pub fn op_now<TP>( - state: &mut OpState, - _argument: (), - _: (), -) -> Result<f64, AnyError> +pub fn op_now<TP>(state: &mut OpState, _argument: ()) -> Result<f64, AnyError> where TP: TimersPermission + 'static, { @@ -68,11 +64,7 @@ impl Resource for TimerHandle { /// Creates a [`TimerHandle`] resource that can be used to cancel invocations of /// [`op_sleep`]. #[op] -pub fn op_timer_handle( - state: &mut OpState, - _: (), - _: (), -) -> Result<ResourceId, AnyError> { +pub fn op_timer_handle(state: &mut OpState) -> Result<ResourceId, AnyError> { let rid = state .resource_table .add(TimerHandle(CancelHandle::new_rc())); @@ -98,7 +90,6 @@ pub async fn op_sleep( pub fn op_sleep_sync<TP>( state: &mut OpState, millis: u64, - _: (), ) -> Result<(), AnyError> where TP: TimersPermission + 'static, |