Skip to content

Mark Result::{ok,err} as #[must_use] #66116

Open
@upsuper

Description

@upsuper

In a discussion in our Rust group, someone incorrectly uses ok() without checking its return value, causing confusing issue. As Result::{is_ok, is_err} are already marked #[must_use] in #59610, I don't see any reason Result::{ok, err} shouldn't be.

cc #48926

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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