ITADN

Fix overflow panic when using `Duration::MAX` for timeout

#167Pull Requestrumpuslabs 创建于 2025-09-24已合并
R
rumpuslabscommented
I tried to get away with passing `Duration::MAX` as a timeout to a function that ultimately called `Receiver::recv_timeout`, and got a panic. [The docs](https://doc.rust-lang.org/stable/std/time/struct.Instant.html#os-specific-behaviors) say > For cross-platform code, you can comfortably use durations of up to around one hundred years. This PR avoids the panic by approximating durations over 100 years (or however far away your platform's maximum `Instant` is) with "never".
合并状态:已合并 合并于 2025-09-24 关闭于 2025-09-24 1 条评论