xia-chao opened PR #15143 from xia-chao:fix/reject-zero-timeouts to bytecodealliance:main:
Fixes #15112
xia-chao removed the review request for wasmtime-core-reviewers from PR #15143.
xia-chao requested wasmtime-core-reviewers for a review on PR #15143.
xia-chao requested cfallin for a review on PR #15143.
:memo: cfallin submitted PR review:
Thanks -- some comments below.
:speech_balloon: cfallin created PR review comment:
Let's not rename functions at import time like this, especially when the rename is semantically meaningful!
:speech_balloon: cfallin created PR review comment:
This is an oddly specific test. If we want to unit-test the string parsing (and we probably should) then maybe just run through a series of test pairs (
"0" -> Err, "1s" -> Duration::from_secs(1), "1ms" -> ...)?
:speech_balloon: cfallin edited PR review comment.
:repeat: pchickey submitted PR review:
Along the lines of Chris's review - redefining the impl for Duration to be always nonzero is the wrong choice, especially with the semantically meaningful rename on import, which we definitely don't want to do.
Lets instead make a newtype wrapper NonzeroDuration(Duration) and a WasmtimeOptionValue impl for that, based on the Duration impl, that excludes zero. NonzeroDuration can impl Deref<Target=Duration> for usability.
xia-chao updated PR #15143.
:thumbs_up: pchickey submitted PR review.
pchickey added PR #15143 cli: reject zero timeouts to the merge queue.
pchickey removed PR #15143 cli: reject zero timeouts from the merge queue.
:check: pchickey merged PR #15143.
Last updated: Nov 19 2026 at 20:05 UTC