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

doc: Method examples for Result and Option #17339

Merged
merged 5 commits into from Sep 22, 2014
Merged

doc: Method examples for Result and Option #17339

merged 5 commits into from Sep 22, 2014

Conversation

@treeman
Copy link
Contributor

@treeman treeman commented Sep 17, 2014

Also some cleanup to conform to documentation style.

treeman added 3 commits Sep 17, 2014
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
Copy link
Member

@steveklabnik steveklabnik Sep 17, 2014

should be "Example" 😄

@steveklabnik
Copy link
Member

@steveklabnik steveklabnik commented Sep 17, 2014

Thanks for this! one other comment: do we need the leading .s in the directives?

@treeman
Copy link
Contributor Author

@treeman treeman commented Sep 17, 2014

We do not actually need the .s. Is it preferred to use the shorter form? I see the {.rust} format in a lot of places.

@steveklabnik
Copy link
Member

@steveklabnik steveklabnik commented Sep 17, 2014

Currently, I've been using {rust} everywhere, but we don't have an official style on this, and I'm actually not sure that it's worth being explicit.

Do you want to maybe collaborate on some kind of doc style guide RFC? /cc @aturon

@treeman
Copy link
Contributor Author

@treeman treeman commented Sep 17, 2014

I could collaborate on something like that yeah.

@treeman
Copy link
Contributor Author

@treeman treeman commented Sep 21, 2014

r?

bors
Copy link
Contributor

bors commented on a0d502b Sep 22, 2014

bors
Copy link
Contributor

bors commented on a0d502b Sep 22, 2014

merging treeman/rust/doc-things = a0d502b into auto

bors
Copy link
Contributor

bors commented on a0d502b Sep 22, 2014

treeman/rust/doc-things = a0d502b merged ok, testing candidate = 8a45818

bors
Copy link
Contributor

bors commented on a0d502b Sep 22, 2014

fast-forwarding master to auto = 8a45818

bors added a commit that referenced this issue Sep 22, 2014
Also some cleanup to conform to documentation style.
@bors bors closed this Sep 22, 2014
@bors bors merged commit a0d502b into rust-lang:master Sep 22, 2014
1 of 2 checks passed
@treeman treeman deleted the doc-things branch Sep 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants