-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(bool_to_option)]
This is a tracking issue for bool::then_some
, a value-receiver version of bool::then
, split off from #64260.
Public API
impl bool {
pub fn then_some<T>(self, t: T) -> Option<T>;
}
Steps / History
- Implementation: Add methods for converting
bool
toOption<T>
#64255 - Final commenting period (FCP)
- Stabilization PR: Stabilize
bool::then_some
#96628
Unresolved Questions
- Do we actually want this method? There was concern that it didn't really pull its weight compared to
bool::then
. There was discussion in about this Tracking issue forbool::then_some
#64260
iago-lito, rsaihe, csnover, Lonami, ahlinc and 27 morestepancheg, arniu and ptrca
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.