Location:
Issue: returns , which is then truncated to with . For a process running longer than ~584 million years, this silently overflows.
Why this matters: The API was changed to return specifically to avoid this truncation on 64-bit platforms where is insufficient. Using defeats the purpose of the return type.
Fix: Use for checked conversion, or match on the and handle overflow explicitly:
Or, since duration is unlikely to overflow in practice, at minimum use per clippy guidance.
References:
- lint
- Related issue filed for truncation in DiffStats
- Related issue filed for cast using instead of
Effort: Low — one-line fix.
Location:
Issue: returns , which is then truncated to with . For a process running longer than ~584 million years, this silently overflows.
Why this matters: The API was changed to return specifically to avoid this truncation on 64-bit platforms where is insufficient. Using defeats the purpose of the return type.
Fix: Use for checked conversion, or match on the and handle overflow explicitly:
Or, since duration is unlikely to overflow in practice, at minimum use per clippy guidance.
References:
Effort: Low — one-line fix.