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

Add doc examples for OsStr, OsString. #40458

Merged
merged 6 commits into from
Mar 17, 2017
Merged

Conversation

frewsxcv
Copy link
Member

No description provided.

Copy link
Member

@GuillaumeGomez GuillaumeGomez left a comment

Choose a reason for hiding this comment

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

Just one nit.

///
/// # Examples
///
/// ```rust
Copy link
Member

Choose a reason for hiding this comment

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

The rust annotation is useless.

Copy link
Member Author

Choose a reason for hiding this comment

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

The API documentation conventions don't mention that we have to remove these annotations.

https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md

Copy link
Member

Choose a reason for hiding this comment

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

I removed the annotations in a lot of places, so please don't add them back.

Copy link
Member Author

Choose a reason for hiding this comment

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

Latest force push removes them.

I removed the annotations in a lot of places, so please don't add them back.

Sure, but just because you removed the annotations doesn't mean we should enforce this everywhere. Personally, I prefer to leave in the rust annotation.

Copy link
Member

Choose a reason for hiding this comment

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

Might be worth to start an official statement about this with @rust-lang/docs.

Copy link
Member

Choose a reason for hiding this comment

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

I thought that the RFC stated to not use them more strongly, but apparently it does not.

/// use std::ffi::OsString;
///
/// let mut s = OsString::new();
/// s.reserve_exact(10);
Copy link
Member

Choose a reason for hiding this comment

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

reserve_exact -> reserve

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catches, thanks!

/// use std::ffi::OsString;
///
/// let mut s = OsString::new();
/// s.reserve(10);
Copy link
Member

Choose a reason for hiding this comment

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

reserve -> reserve_exact

@frewsxcv
Copy link
Member Author

Comments have been addressed.

@frewsxcv
Copy link
Member Author

@GuillaumeGomez Everything look good here?

@frewsxcv frewsxcv dismissed GuillaumeGomez’s stale review March 14, 2017 22:27

Comments have been addressed.

@bors
Copy link
Contributor

bors commented Mar 15, 2017

☔ The latest upstream changes (presumably #40009) made this pull request unmergeable. Please resolve the merge conflicts.

@GuillaumeGomez
Copy link
Member

r=me once conflicts fixed.

@frewsxcv
Copy link
Member Author

@bors r=GuillaumeGomez rollup

@bors
Copy link
Contributor

bors commented Mar 17, 2017

📌 Commit bc6eecd has been approved by GuillaumeGomez

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 17, 2017
…eGomez

Add doc examples for `OsStr`, `OsString`.

None
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 17, 2017
…eGomez

Add doc examples for `OsStr`, `OsString`.

None
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 17, 2017
…eGomez

Add doc examples for `OsStr`, `OsString`.

None
bors added a commit that referenced this pull request Mar 17, 2017
@bors bors merged commit bc6eecd into rust-lang:master Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants