Skip to content

Commit 2746e4d

Browse files
committed
Change reset behavious to panic
1 parent 1c66b18 commit 2746e4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/delay_wasm.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ impl Delay {
1717
)
1818
}
1919

20-
/// Resets the timeout. Does nothing on wasm.
20+
/// Resets the timeout. Panics on wasm.
2121
#[inline]
22-
pub fn reset(&mut self, at: Instant) {}
22+
pub fn reset(&mut self, at: Instant) {
23+
panic!("Resetting the timeout is not supported on wasm.")
24+
}
2325
}
2426

2527
impl Future for Delay {

0 commit comments

Comments
 (0)