-
Notifications
You must be signed in to change notification settings - Fork 13.3k
doc: Method examples for Result and Option #17339
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
Conversation
Remove ~~~ for code block specification. Use /// Over /** */ for doc blocks.
@@ -270,6 +326,18 @@ impl<T> Option<T> { | |||
/// In general, because this function may fail, its use is discouraged. | |||
/// Instead, prefer to use pattern matching and handle the `None` | |||
/// case explicitly. | |||
/// | |||
/// # Examle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be "Example" 😄
Thanks for this! one other comment: do we need the leading |
We do not actually need the |
Currently, I've been using Do you want to maybe collaborate on some kind of doc style guide RFC? /cc @aturon |
I could collaborate on something like that yeah. |
r? |
Also some cleanup to conform to documentation style.
Also some cleanup to conform to documentation style.