Improve std::path docs#41348
Merged
bors merged 5 commits intorust-lang:masterfrom Apr 20, 2017
chordowl:std-path-docs
Merged
Conversation
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
suggested changes
Apr 18, 2017
Contributor
frewsxcv
left a comment
There was a problem hiding this comment.
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`). |
Contributor
There was a problem hiding this comment.
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 |
Contributor
There was a problem hiding this comment.
This parenthesis is never closed
src/libstd/path.rs
Outdated
| /// 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. |
* Closed an unclosed paren * seperator -> separator * deperator -> separator
Contributor
Author
|
Comments have been addressed, fixed another typo along the way, too! 😅 |
Contributor
|
Thanks again! @bors r+ rollup |
Collaborator
|
📌 Commit d6f7577 has been approved by |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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