Skip to content

Minor improvements to docs in std::env structures/functions. #39028

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

Merged
merged 1 commit into from
Jan 17, 2017

Conversation

frewsxcv
Copy link
Member

  • Call functions "functions" instead of "methods".
  • Link structures to their constructor functions
  • Add other misc. documentation links

* Call functions "functions" instead of "methods".
* Link structures to their constructor functions
* Add other misc. documentation links
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@@ -68,15 +68,17 @@ pub fn set_current_dir<P: AsRef<Path>>(p: P) -> io::Result<()> {

/// An iterator over a snapshot of the environment variables of this process.
///
/// This iterator is created through `std::env::vars()` and yields `(String,
/// String)` pairs.
/// This structure is created through the [`std::env::vars`] function.
Copy link
Member

@nagisa nagisa Jan 13, 2017

Choose a reason for hiding this comment

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

Previous sentence was strictly more informative IMO.

Copy link
Member Author

Choose a reason for hiding this comment

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

How so? "yields (String, String) pairs." isn't saying anything more than what's displayed in the Iterator section of Env.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, never mind me, I totally thought this was documentation for the function, which hasn’t such information displayed.

#[stable(feature = "env", since = "1.0.0")]
pub struct Vars { inner: VarsOs }

/// An iterator over a snapshot of the environment variables of this process.
///
/// This iterator is created through `std::env::vars_os()` and yields
/// `(OsString, OsString)` pairs.
/// This structure is created through the [`std::env::vars_os`] function.
Copy link
Member

Choose a reason for hiding this comment

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

Ditto here.

@brson
Copy link
Contributor

brson commented Jan 13, 2017

r=me whenever @nagisa is satisfied

@nagisa
Copy link
Member

nagisa commented Jan 14, 2017

LGTM.

@frewsxcv
Copy link
Member Author

@bors r=brson

@bors
Copy link
Collaborator

bors commented Jan 14, 2017

📌 Commit 58a470e has been approved by brson

@frewsxcv
Copy link
Member Author

@bors rollup

@bors
Copy link
Collaborator

bors commented Jan 16, 2017

⌛ Testing commit 58a470e with merge 41d6fc3...

@bors
Copy link
Collaborator

bors commented Jan 16, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

alexcrichton commented Jan 16, 2017 via email

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 16, 2017
Minor improvements to docs in std::env structures/functions.

* Call functions "functions" instead of "methods".
* Link structures to their constructor functions
* Add other misc. documentation links
bors added a commit that referenced this pull request Jan 16, 2017
Rollup of 6 pull requests

- Successful merges: #38247, #39028, #39065, #39084, #39105, #39106
- Failed merges:
@bors bors merged commit 58a470e into rust-lang:master Jan 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.

6 participants