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

Stabilize result_option_inspect #116866

Merged
merged 2 commits into from Nov 13, 2023
Merged

Conversation

slanterns
Copy link
Contributor

This PR stabilizes result_option_inspect:

// core::option

impl Option<T> {
    pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
}

// core::result

impl Result<T, E> {
    pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
    pub fn inspect_err<F: FnOnce(&E)>(self, f: F) -> Self;
}

Tracking issue: #91345.
Implementation PR: #91346.

Closes #91345.

@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2023

r? @joshtriplett

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 17, 2023
@slanterns
Copy link
Contributor Author

Waiting for fcp to complete.

r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Oct 17, 2023
@rustbot rustbot assigned BurntSushi and unassigned joshtriplett Oct 17, 2023
@slanterns
Copy link
Contributor Author

FCP has been completed. Gently ping for a review :)

@slanterns
Copy link
Contributor Author

Ping @BurntSushi ^_^

@BurntSushi
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 13, 2023

📌 Commit ed512e9 has been approved by BurntSushi

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 13, 2023
@bors
Copy link
Contributor

bors commented Nov 13, 2023

⌛ Testing commit ed512e9 with merge 85b8450...

@bors
Copy link
Contributor

bors commented Nov 13, 2023

☀️ Test successful - checks-actions
Approved by: BurntSushi
Pushing 85b8450 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 13, 2023
@bors bors merged commit 85b8450 into rust-lang:master Nov 13, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 13, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (85b8450): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.7%, 0.8%] 2

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.5%, 0.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.3%, -2.1%] 2
All ❌✅ (primary) 0.6% [0.5%, 0.7%] 2

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 674.599s -> 674.958s (0.05%)
Artifact size: 311.11 MiB -> 311.10 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue for result_option_inspect
6 participants