diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-04 18:55:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-04 18:55:43 +0200 |
| commit | 8f8a36d1c2795dcdab29d12a73cc49fd252ecc34 (patch) | |
| tree | 4d295eacb1f41ade8bf3a1d1dc5084d92d5523c1 /library/std/src | |
| parent | c4ea4fb576e0fbdd89f4d99ef8474f422469f7ed (diff) | |
| parent | 3afbc115f7f7f6b94c213bd3e5a19004cffe196f (diff) | |
| download | rust-8f8a36d1c2795dcdab29d12a73cc49fd252ecc34.tar.gz rust-8f8a36d1c2795dcdab29d12a73cc49fd252ecc34.zip | |
Rollup merge of #101385 - BartMassey-upstream:file-doc, r=thomcc
updated description of File struct in std::fs I've seen several folks confused by the description of `std::fs::File` as "A reference to an open file on the filesystem." Apparently the word `reference` is sometimes taken to mean a Rust `&` reference, leading to confusion. Here's a recent representative [Reddit thread](https://www.reddit.com/r/rust/comments/x4k0lv/comment/imxu7v2/?utm_source=share&utm_medium=web2x&context=3), but I've seen this before as well. This patch changes the description to "An object providing access to an open file on the filesystem." Hopefully this is clearer.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/fs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 28a2c99f7e5..c6c78dc3939 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -19,7 +19,7 @@ use crate::sys::fs as fs_imp; use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner}; use crate::time::SystemTime; -/// A reference to an open file on the filesystem. +/// An object providing access to an open file on the filesystem. /// /// An instance of a `File` can be read and/or written depending on what options /// it was opened with. Files also implement [`Seek`] to alter the logical cursor |
