Skip to content

Implement Default for std::time::Duration #37546

Closed
@luser

Description

@luser

Duration doesn't implement Default. I found this out because I had a struct with #[derive(Default)] and I tried to add a Duration member to it, and that no longer worked. This means that I'd have to manually implement Default, which stinks because the struct has quite a few members. It seems like we could give Duration an implementation that just returns a zero-length Duration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions