-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Clarify writable behavior of readonly-named Permissions
methods.
#43883
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 writable behavior of readonly-named Permissions
methods.
#43883
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
src/libstd/fs.rs
Outdated
/// Modifies the readonly flag for this set of permissions. If the | ||
/// `readonly` argument is `true`, using the resulting `Permission` will | ||
/// make the file unwritable. Conversely, if it's is `false`, using the | ||
/// resulting `Permission` will make the file writable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all sounds wordy, if anyone has suggestions to improve the flow here, would love to hear!
copying from our conversation in IRC: "Unwritable", while accurate, sounds a little clumsy. The
I originally had "will make the file unable to be written to" for the "if true" sentence, but i kinda like the allow/forbid dichotomy like this. |
9043b7a
to
4c68a52
Compare
4c68a52
to
10a479e
Compare
@QuietMisdreavus tweaked the wording a little bit. let me know how that sounds diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index d678705626..a12f55ad9c 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -936,8 +936,9 @@ impl Permissions {
/// Modifies the readonly flag for this set of permissions. If the
/// `readonly` argument is `true`, using the resulting `Permission` will
- /// make the file unwritable. Conversely, if it's is `false`, using the
- /// resulting `Permission` will make the file writable.
+ /// update file permissions to forbid writing. Conversely, if it's `false`,
+ /// using the resulting `Permission` will update file permissions to allow
+ /// writing.
///
/// This operation does **not** modify the filesystem. To modify the
/// filesystem use the `fs::set_permissions` function. |
Looks good, thanks! @bors r+ rollup |
📌 Commit 10a479e has been approved by |
…r=QuietMisdreavus Clarify writable behavior of readonly-named `Permissions` methods. Opened primarily to fix #41984.
☀️ Test successful - status-appveyor, status-travis |
Opened primarily to fix #41984.