Skip to content

Commit 83cd1da

Browse files
bors[bot]rtzoeller
andauthored
1620: Fix typos in documentation r=asomers a=rtzoeller Co-authored-by: Ryan Zoeller <[email protected]>
2 parents a392647 + 57f41a8 commit 83cd1da

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

src/poll.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::errno::Errno;
1010
/// [`ppoll`](fn.ppoll.html) functions to specify the events of interest
1111
/// for a specific file descriptor.
1212
///
13-
/// After a call to `poll` or `ppoll`, the events that occured can be
13+
/// After a call to `poll` or `ppoll`, the events that occurred can be
1414
/// retrieved by calling [`revents()`](#method.revents) on the `PollFd`.
1515
#[repr(transparent)]
1616
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
@@ -31,7 +31,7 @@ impl PollFd {
3131
}
3232
}
3333

34-
/// Returns the events that occured in the last call to `poll` or `ppoll`. Will only return
34+
/// Returns the events that occurred in the last call to `poll` or `ppoll`. Will only return
3535
/// `None` if the kernel provides status flags that Nix does not know about.
3636
pub fn revents(self) -> Option<PollFlags> {
3737
PollFlags::from_bits(self.pollfd.revents)

src/pty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub fn grantpt(fd: &PtyMaster) -> Result<()> {
112112
/// Open a pseudoterminal device (see
113113
/// [`posix_openpt(3)`](https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.html))
114114
///
115-
/// `posix_openpt()` returns a file descriptor to an existing unused pseuterminal master device.
115+
/// `posix_openpt()` returns a file descriptor to an existing unused pseudoterminal master device.
116116
///
117117
/// # Examples
118118
///
@@ -214,7 +214,7 @@ pub fn ptsname_r(fd: &PtyMaster) -> Result<String> {
214214
///
215215
/// `unlockpt()` unlocks the slave pseudoterminal device corresponding to the master pseudoterminal
216216
/// referred to by `fd`. This must be called before trying to open the slave side of a
217-
/// pseuoterminal.
217+
/// pseudoterminal.
218218
#[inline]
219219
pub fn unlockpt(fd: &PtyMaster) -> Result<()> {
220220
if unsafe { libc::unlockpt(fd.as_raw_fd()) } < 0 {

src/sys/signal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ pub fn pthread_sigmask(how: SigmaskHow,
866866

867867
/// Examine and change blocked signals.
868868
///
869-
/// For more informations see the [`sigprocmask` man
869+
/// For more information see the [`sigprocmask` man
870870
/// pages](https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html).
871871
pub fn sigprocmask(how: SigmaskHow, set: Option<&SigSet>, oldset: Option<&mut SigSet>) -> Result<()> {
872872
if set.is_none() && oldset.is_none() {

src/sys/statfs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ impl Debug for Statfs {
536536

537537
/// Describes a mounted file system.
538538
///
539-
/// The result is OS-dependent. For a portabable alternative, see
539+
/// The result is OS-dependent. For a portable alternative, see
540540
/// [`statvfs`](crate::sys::statvfs::statvfs).
541541
///
542542
/// # Arguments
@@ -552,7 +552,7 @@ pub fn statfs<P: ?Sized + NixPath>(path: &P) -> Result<Statfs> {
552552

553553
/// Describes a mounted file system.
554554
///
555-
/// The result is OS-dependent. For a portabable alternative, see
555+
/// The result is OS-dependent. For a portable alternative, see
556556
/// [`fstatvfs`](crate::sys::statvfs::fstatvfs).
557557
///
558558
/// # Arguments

src/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::mem::MaybeUninit;
1414

1515
/// Clock identifier
1616
///
17-
/// Newtype pattern around `clockid_t` (which is just alias). It pervents bugs caused by
17+
/// Newtype pattern around `clockid_t` (which is just alias). It prevents bugs caused by
1818
/// accidentally passing wrong value.
1919
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2020
pub struct ClockId(clockid_t);

src/unistd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ impl ForkResult {
204204
/// Create a new child process duplicating the parent process ([see
205205
/// fork(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html)).
206206
///
207-
/// After calling the fork system call (successfully) two processes will
208-
/// be created that are identical with the exception of their pid and the
207+
/// After successfully calling the fork system call, a second process will
208+
/// be created which is identical to the original except for the pid and the
209209
/// return value of this function. As an example:
210210
///
211211
/// ```
@@ -225,7 +225,7 @@ impl ForkResult {
225225
/// }
226226
/// ```
227227
///
228-
/// This will print something like the following (order indeterministic). The
228+
/// This will print something like the following (order nondeterministic). The
229229
/// thing to note is that you end up with two processes continuing execution
230230
/// immediately after the fork call but with different match arms.
231231
///

test/sys/test_ptrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn test_ptrace_cont() {
7272
let _m = crate::FORK_MTX.lock();
7373

7474
// FIXME: qemu-user doesn't implement ptrace on all architectures
75-
// and retunrs ENOSYS in this case.
75+
// and returns ENOSYS in this case.
7676
// We (ab)use this behavior to detect the affected platforms
7777
// and skip the test then.
7878
// On valid platforms the ptrace call should return Errno::EPERM, this

test/sys/test_sockopt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn test_so_tcp_maxseg() {
122122
}
123123

124124
// The CI doesn't supported getsockopt and setsockopt on emulated processors.
125-
// It's beleived that a QEMU issue, the tests run ok on a fully emulated system.
125+
// It's believed that a QEMU issue, the tests run ok on a fully emulated system.
126126
// Current CI just run the binary with QEMU but the Kernel remains the same as the host.
127127
// So the syscall doesn't work properly unless the kernel is also emulated.
128128
#[test]

test/test_mount.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod common;
22

3-
// Impelmentation note: to allow unprivileged users to run it, this test makes
3+
// Implementation note: to allow unprivileged users to run it, this test makes
44
// use of user and mount namespaces. On systems that allow unprivileged user
55
// namespaces (Linux >= 3.8 compiled with CONFIG_USER_NS), the test should run
66
// without root.

0 commit comments

Comments
 (0)