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

clarify documentation of remove_dir errors #75324

Merged
merged 1 commit into from
Aug 21, 2020
Merged

Conversation

ericseppanen
Copy link
Contributor

remove_dir will error if the path doesn't exist or isn't a directory.

It's useful to clarify that this is "remove dir or fail" not "remove dir
if it exists".

I don't think this belongs in the title. "Removes an existing, empty
directory" is strangely worded-- there's no such thing as a non-existing
directory. Better to just say explicitly it will return an error.

remove_dir will error if the path doesn't exist or isn't a directory.

It's useful to clarify that this is "remove dir or fail" not "remove dir
if it exists".

I don't think this belongs in the title. "Removes an existing, empty
directory" is strangely worded-- there's no such thing as a non-existing
directory.  Better to just say explicitly it will return an error.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @shepmaster (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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2020
@ericseppanen
Copy link
Contributor Author

Note: a similar change was recently added to the docs for remove_file (see c4e44d7). I think the two should be consistent about documenting the "doesn't exist" case.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Looks good!

@JohnTitor
Copy link
Member

This PR is inactive for a week or so, let's r? @Mark-Simulacrum, I think it's good to go.

@Dylan-DPC-zz
Copy link

@bors r=JohnTitor rollup

@bors
Copy link
Contributor

bors commented Aug 20, 2020

📌 Commit f85d231 has been approved by JohnTitor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 21, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#75324 (clarify documentation of remove_dir errors)
 - rust-lang#75532 (Fix RFC-1014 test)
 - rust-lang#75664 (Update mailmap for mati865)
 - rust-lang#75727 (Switch to intra-doc links in `core::result`)
 - rust-lang#75750 (Move to intra doc links for std::thread documentation)

Failed merges:

r? @ghost
@bors bors merged commit f2d2553 into rust-lang:master Aug 21, 2020
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants