Tracking Issue for Duration::{zero, is_zero}
(#![feature(duration_zero)]
) · Issue #73544 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
This is a tracking issue for Duration::{ZERO, is_zero}
(#![feature(duration_zero)]
). Proposed in RFC 2814 which got closed just because such a small change does not require an RFC. Proposed again and implemented in #72790.
impl Duration { pub const ZERO: Duration; pub const fn is_zero(&self) -> bool; }
Steps
- Implement (core/time: Add Duration methods for zero #72790)
- FCP
- Stabilization PR (Stabilize duration_zero. #84084)
Unresolved questions:
- Also add an associated constant
ZERO
? yes. done - Should the associated constant be preferred over the
zero
function? yes,zero()
is removed.