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

Improve std::path docs #41348

Merged
merged 5 commits into from
Apr 20, 2017
Merged

Improve std::path docs #41348

merged 5 commits into from
Apr 20, 2017

Conversation

chordowl
Copy link
Contributor

Fixes #29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik

lukaramu added 4 commits April 15, 2017 23:55
Part of #29368.
* added missing links
* updated method summaries to use 3rd person style
* added missing periods in `Component`'s variant summaries
* use standard iterator boilerplate in `Components`' and `Iter`'s docs
* added example to `Iter::as_path`, adapted from `Components::as_path`'s
  example
* consolidated examples for `Path::file_name`
* some other small fixes
Part of #29368.
* Added a new summary paragraph about std::path's parsing facilities
* Slightly exanded `Component`'s docs
* removed the now redundant section on component types from the module docs
* moved the section on path normalization during parsing to the docs on
  `Path::components`
* Clarified difference between `Prefix` and `PrefixComponent` in their
  respecive summary sentences
Part of #29368.
* Added explanation for why the struct exists
* Added link to where it is created
* Added example
@frewsxcv frewsxcv added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Apr 18, 2017
@frewsxcv frewsxcv self-requested a review April 18, 2017 03:42
@frewsxcv frewsxcv self-assigned this Apr 18, 2017
@frewsxcv frewsxcv removed their request for review April 18, 2017 03:43
Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

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

All the changes here are great @lukaramu, awesome work! Just a couple small nits and this should be good to go 👌

///
/// Note that no other normalization takes place; in particular, `a/c`
/// and `a/b/../c` are distinct, to account for the possibility that `b`
/// is a symbolic link (so its parent isn't `a`).
Copy link
Member

Choose a reason for hiding this comment

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

Good call, I think it makes sense to have this normalization section here

/// performed.
/// Windows uses a variety of path prefix styles, including references to drive
/// volumes (like `C:`), network shared folders (like `\\server\share`), and
/// others. In addition, some path prefixes are "verbatim" (i.e. prefixed with
Copy link
Member

Choose a reason for hiding this comment

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

This parenthesis is never closed

/// The root directory component, appears after any prefix and before anything else
/// The root directory component, appears after any prefix and before anything else.
///
/// It represents a deperator that designates that a path starts from root.
Copy link
Member

Choose a reason for hiding this comment

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

deperator -> seperator

* Closed an unclosed paren
* seperator -> separator
* deperator -> separator
@chordowl
Copy link
Contributor Author

Comments have been addressed, fixed another typo along the way, too! 😅

@frewsxcv
Copy link
Member

Thanks again!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 18, 2017

📌 Commit d6f7577 has been approved by frewsxcv

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 18, 2017
Improve std::path docs

Fixes rust-lang#29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 18, 2017
Improve std::path docs

Fixes rust-lang#29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 18, 2017
Improve std::path docs

Fixes rust-lang#29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 19, 2017
Improve std::path docs

Fixes rust-lang#29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 19, 2017
Improve std::path docs

Fixes rust-lang#29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 19, 2017
Improve std::path docs

Fixes rust-lang#29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 20, 2017
Improve std::path docs

Fixes rust-lang#29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
bors added a commit that referenced this pull request Apr 20, 2017
Rollup of 7 pull requests

- Successful merges: #41295, #41348, #41374, #41380, #41391, #41398, #41403
- Failed merges: #41376
@bors bors merged commit d6f7577 into rust-lang:master Apr 20, 2017
@chordowl chordowl deleted the std-path-docs branch April 20, 2017 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools 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.

4 participants