Skip to content

mention the possibility of using enum constructors as functions in expressions #25850

Closed
@nliberg

Description

@nliberg

Neither the nightly Rust reference nor the book seem to mention the fact that one can use enum constructors in a function like way inside expressions, eg. my_iterator.map(Option::Some).

(unless I'm mistaken and it's there somewhere, but I didn't find it)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions