Skip to content

Rename first argument Option::unwrap_or to defaultΒ #65492

Closed
@timClicks

Description

@timClicks

We currently use the definition for Option::unwrap_or:

pub fn unwrap_or(self, def: T) -> T

I sometimes read def as define. It would be clearer for me (and hopefully others!) if it had the following signature:

pub fn unwrap_or(self, default: T) -> T

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.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