Skip to content

Tracking Issue for Result::into_ok_or_err / feature(result_into_ok_or_err) #82223

Description

@thomcc

Feature gate: #![feature(result_into_ok_or_err)]

This is a tracking issue for Result::into_ok_or_err, a method to get the T out of Result<T, T> regardless of which variant is active.

Public API

impl<T> Result<T, T> {
    pub const fn into_ok_or_err(self) -> T;
}

Steps / History

Unresolved Questions

  • What color should the bikeshed be What name should it have?
    Some options that have been suggested:
    • Result::into_ok_or_err
    • Result::ok_or_err
    • Result::into_either
    • Result::into_inner
    • Result::either_value
    • Result::unwrap_either
    • Several more suggested options are listed in the issue.
  • Do we want a reference version as well, as add Result::{value, into_value} #79315 proposed?

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-api[DEPRECATED; DO NOT USE]disposition-closeThis PR / issue is in PFCP or FCP with a disposition to close it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions