Rollup merge of #109263 - squell:master, r=cuviper

fix typo in documentation for std::fs::Permissions

Please check and re-check this PR carefully to see if I got this right.

But by my logic, if the `read_only` function returns `true`, I would not expect be able to write to the file (it being read only); so this text is meant to clarify that `read_only` being `false` doesn't mean *you* can actually write to the file, just that "in general" someone is able to.
This commit is contained in:
Matthias Krüger 2024-03-02 10:09:34 +01:00 committed by GitHub
commit d0e5431eb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1476,11 +1476,10 @@ impl Permissions {
/// On Unix-based platforms this checks if *any* of the owner, group or others
/// write permission bits are set. It does not check if the current
/// user is in the file's assigned group. It also does not check ACLs.
/// Therefore even if this returns true you may not be able to write to the
/// file, and vice versa. The [`PermissionsExt`] trait gives direct access
/// to the permission bits but also does not read ACLs. If you need to
/// accurately know whether or not a file is writable use the `access()`
/// function from libc.
/// Therefore the return value of this function cannot be relied upon
/// to predict whether attempts to read or write the file will actually succeed.
/// The [`PermissionsExt`] trait gives direct access to the permission bits but
/// also does not read ACLs.
///
/// [`PermissionsExt`]: crate::os::unix::fs::PermissionsExt
///