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

Update Option Documentation #78037

Closed
wants to merge 1 commit into from

Conversation

gsquire
Copy link
Contributor

@gsquire gsquire commented Oct 17, 2020

This patch updates the Option documentation for the filter function so that the Some variant link is correctly rendered.

Here is how it currently looks for the latest stable release:

image

This patch updates the Option documentation for the filter function so
that the Some variant link is correctly rendered.
@rust-highfive
Copy link
Collaborator

r? @cramertj

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2020
@@ -667,7 +667,7 @@ impl<T> Option<T> {
/// Returns [`None`] if the option is [`None`], otherwise calls `predicate`
/// with the wrapped value and returns:
///
/// - [`Some(t)`] if `predicate` returns `true` (where `t` is the wrapped
/// - [`Some`] if `predicate` returns `true` (where `t` is the wrapped
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've orphaned the mention of t here.

Copy link
Contributor

@pickfire pickfire Oct 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to remove the brack along with t at the back.

Maybe it would be good to mention the condition first rather than the result, like "if predicate returns true returns Some"?

@ollie27
Copy link
Member

ollie27 commented Oct 17, 2020

The broken link was already fixed by #77971 so it works in the nightly docs.

@gsquire
Copy link
Contributor Author

gsquire commented Oct 17, 2020

Ah okay, cool. I'll close this out then!

@gsquire gsquire closed this Oct 17, 2020
@gsquire gsquire deleted the option-documentation-fix branch October 17, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants