about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-08-22 08:57:38 +0200
committerGitHub <noreply@github.com>2023-08-22 08:57:38 +0200
commit2cb9d3def2515e0717f3d8364e83dc2e52ace63c (patch)
tree4354627c6f0ae4018e841c09b503ade53abd7588 /library/std/src
parente9eca7cda449490fd818b853068ea21518d19066 (diff)
downloadrust-2cb9d3def2515e0717f3d8364e83dc2e52ace63c.tar.gz
rust-2cb9d3def2515e0717f3d8364e83dc2e52ace63c.zip
typos and wording
Co-authored-by: Dan Gohman <dev@sunfishcode.online>
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 3dd8ff819ac..4c599cbc1aa 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -244,9 +244,9 @@
 //! means that file descriptors can be *exclusively owned*. (Here, "file descriptor" is meant to
 //! subsume similar concepts that exist across a wide range of operating systems even if they might
 //! use a different name, such as "handle".) An exclusively owned file descriptor is one that no
-//! other code is allowed to access in any way, but the owner is allowed to a access and even close
+//! other code is allowed to access in any way, but the owner is allowed to access and even close
 //! it any time. A type that owns its file descriptor should usually close it in its `drop`
-//! function. Types like [`File`] generally own their file descriptor. Similarly, file descriptors
+//! function. Types like [`File`] own their file descriptor. Similarly, file descriptors
 //! can be *borrowed*, granting the temporary right to perform operations on this file descriptor.
 //! This indicates that the file descriptor will not be closed for the lifetime of the borrow, but
 //! it does *not* imply any right to close this file descriptor, since it will likely be owned by
@@ -270,7 +270,7 @@
 //! some operating systems). File descriptors basically work like [`Arc`]: when you receive an owned
 //! file descriptor, you cannot know whether there are any other file descriptors that reference the
 //! same kernel object. However, when you create a new kernel object, you know that you are holding
-//! the only reference to it. Just be careful not to borrow it to anyone, since they can obtain a
+//! the only reference to it. Just be careful not to lend it to anyone, since they can obtain a
 //! clone and then you can no longer know what the reference count is! In that sense, [`OwnedFd`] is
 //! like `Arc` and [`BorrowedFd<'a>`] is like `&'a Arc` (and similar for the Windows types). There
 //! is no equivalent to `Box` for file descriptors in the standard library (that would be a type