Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for Result::map_or #66293

Closed
tesuji opened this issue Nov 11, 2019 · 0 comments · Fixed by #66570
Closed

Tracking issue for Result::map_or #66293

tesuji opened this issue Nov 11, 2019 · 0 comments · Fixed by #66570
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Nov 11, 2019

PR #66292 added Result::map_or with implementation:

impl<T, E> Result<T, E> {
    pub fn map_or<U, F: FnOnce(T) -> U>(self, default: U, f: F) -> U {
        match self {
            Ok(t) => f(t),
            Err(_) => default,
        }
    }
}
@csmoe csmoe added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Nov 11, 2019
Centril added a commit to Centril/rust that referenced this issue Dec 15, 2019
@bors bors closed this as completed in 84ef889 Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants