-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Implement Default for std::time::Duration #37546
Copy link
Copy link
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Durationdoesn't implementDefault. I found this out because I had a struct with#[derive(Default)]and I tried to add aDurationmember to it, and that no longer worked. This means that I'd have to manually implementDefault, which stinks because the struct has quite a few members. It seems like we could giveDurationan implementation that just returns a zero-lengthDuration.