Skip to content

Commit 813ec1f

Browse files
committed
Fix a few more spelling errors and missing code quotes.
1 parent bc8ea07 commit 813ec1f

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

src/fs/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub use imp::fs::{Dev, RawMode};
209209

210210
/// Timestamps used by [`utimensat`] and [`futimens`].
211211
//
212-
// This is `repr(c)` and specifically layed out to match the representation
212+
// This is `repr(c)` and specifically laid out to match the representation
213213
// used by `utimensat` and `futimens`, which expect 2-element arrays of
214214
// timestamps.
215215
#[repr(C)]

src/imp/libc/fs/syscalls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub(crate) fn openat(
113113
) -> io::Result<OwnedFd> {
114114
unsafe {
115115
// Pass `mode` as a `c_uint` even if `mode_t` is narrower, since
116-
// `libc_openat` is declared as a variadic function and narrrower
116+
// `libc_openat` is declared as a variadic function and narrower
117117
// arguments are promoted.
118118
ret_owned_fd(libc_openat(
119119
borrowed_fd(dirfd),
@@ -322,7 +322,7 @@ pub(crate) fn chmodat(dirfd: BorrowedFd<'_>, path: &ZStr, mode: Mode) -> io::Res
322322
// Note that Linux's `fchmodat` does not have a flags argument.
323323
unsafe {
324324
// Pass `mode` as a `c_uint` even if `mode_t` is narrower, since
325-
// `libc_openat` is declared as a variadic function and narrrower
325+
// `libc_openat` is declared as a variadic function and narrower
326326
// arguments are promoted.
327327
syscall_ret(c::syscall(
328328
c::SYS_fchmodat,

src/imp/libc/fs/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ pub type FsWord = u32;
744744
))]
745745
pub type FsWord = u64;
746746

747-
// s390x uses u32 for statfs entries, even though __fsword_t is u64.
747+
// s390x uses `u32` for `statfs` entries, even though `__fsword_t` is `u64`.
748748
#[cfg(all(target_os = "linux", target_arch = "s390x"))]
749749
pub type FsWord = u32;
750750

src/imp/libc/io/syscalls.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ pub(crate) fn is_read_write(fd: BorrowedFd<'_>) -> io::Result<(bool, bool)> {
413413
} {
414414
0 => read = false,
415415
-1 => {
416-
#[allow(unreachable_patterns)] // EAGAIN may equal EWOULDBLOCK
416+
#[allow(unreachable_patterns)] // `EAGAIN` may equal `EWOULDBLOCK`
417417
match errno().0 {
418418
c::EAGAIN | c::EWOULDBLOCK => (),
419419
c::ENOTSOCK => not_socket = true,
@@ -428,7 +428,7 @@ pub(crate) fn is_read_write(fd: BorrowedFd<'_>) -> io::Result<(bool, bool)> {
428428
// the write side is shut down.
429429
match unsafe { c::send(borrowed_fd(fd), [].as_ptr(), 0, c::MSG_DONTWAIT) } {
430430
-1 => {
431-
#[allow(unreachable_patterns)] // EAGAIN may equal EWOULDBLOCK
431+
#[allow(unreachable_patterns)] // `EAGAIN` may equal `EWOULDBLOCK`
432432
match errno().0 {
433433
c::EAGAIN | c::EWOULDBLOCK => (),
434434
c::ENOTSOCK => (),
@@ -483,7 +483,7 @@ pub(crate) fn dup2_with(fd: BorrowedFd<'_>, new: &OwnedFd, flags: DupFlags) -> i
483483
target_os = "redox"
484484
))]
485485
pub(crate) fn dup2_with(fd: BorrowedFd<'_>, new: &OwnedFd, _flags: DupFlags) -> io::Result<()> {
486-
// Android 5.0 has dup3, but libc doesn't have bindings
486+
// Android 5.0 has `dup3`, but libc doesn't have bindings
487487
dup2(fd, new)
488488
}
489489

src/imp/linux_raw/io/syscalls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ pub(crate) fn is_read_write(fd: BorrowedFd<'_>) -> io::Result<(bool, bool)> {
484484
match super::super::syscalls::recv(fd, &mut buf, RecvFlags::PEEK | RecvFlags::DONTWAIT) {
485485
Ok(0) => read = false,
486486
Err(err) => {
487-
#[allow(unreachable_patterns)] // EAGAIN may equal EWOULDBLOCK
487+
#[allow(unreachable_patterns)] // `EAGAIN` may equal `EWOULDBLOCK`
488488
match err {
489489
io::Error::AGAIN | io::Error::WOULDBLOCK => (),
490490
io::Error::NOTSOCK => not_socket = true,
@@ -497,7 +497,7 @@ pub(crate) fn is_read_write(fd: BorrowedFd<'_>) -> io::Result<(bool, bool)> {
497497
if write && !not_socket {
498498
// Do a `send` with `DONTWAIT` for 0 bytes. An `EPIPE` indicates
499499
// the write side is shut down.
500-
#[allow(unreachable_patterns)] // EAGAIN equals EWOULDBLOCK
500+
#[allow(unreachable_patterns)] // `EAGAIN` equals `EWOULDBLOCK`
501501
match super::super::syscalls::send(fd, &[], SendFlags::DONTWAIT) {
502502
// TODO or-patterns when we don't need 1.51
503503
Err(io::Error::AGAIN) => (),

src/imp/linux_raw/process/syscalls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub(crate) fn geteuid() -> Uid {
180180
#[inline]
181181
pub(crate) fn sched_getaffinity(pid: Option<Pid>, cpuset: &mut RawCpuSet) -> io::Result<()> {
182182
unsafe {
183-
// The raw linux syscall returns the size (in bytes) of the cpumask_t
183+
// The raw linux syscall returns the size (in bytes) of the `cpumask_t`
184184
// data type that is used internally by the kernel to represent the CPU
185185
// set bit mask.
186186
let size = ret_usize(syscall3(

src/process/sched.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl CpuSet {
2222
/// The maximum number of CPU in `CpuSet`.
2323
pub const MAX_CPU: usize = imp::process::CPU_SETSIZE;
2424

25-
/// Create a new and empty CpuSet.
25+
/// Create a new and empty `CpuSet`.
2626
#[inline]
2727
pub fn new() -> CpuSet {
2828
CpuSet {

tests/fs/invalid_offset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! POSIX-ish interfaces tend to use signed integers for file offsets, while
2-
//! Rust APIs tend to use `u64`. Test that exreme `u64` values in APIs that
2+
//! Rust APIs tend to use `u64`. Test that extreme `u64` values in APIs that
33
//! take file offsets are properly diagnosed.
44
//!
55
//! These tests are disabled on ios/macos since those platforms kill the
6-
//! process with SIGXFSZ instead of returning an error.
6+
//! process with `SIGXFSZ` instead of returning an error.
77
88
#![cfg(not(any(target_os = "redox", target_os = "wasi")))]
99

tests/io/read_write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn test_readwrite_pv() {
1515
)
1616
.unwrap();
1717

18-
// For most targets, just call pwritev.
18+
// For most targets, just call `pwritev`.
1919
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
2020
{
2121
pwritev(&foo, &[IoSlice::new(b"hello")], 200).unwrap();

tests/net/unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Test a simple Unix-domain socket server and client. The client sends lists
22
//! of integers and the server sends back sums.
33
4-
// This test uses AF_UNIX with SOCK_SEQPACKET which is unsupported on macOS.
4+
// This test uses `AF_UNIX` with `SOCK_SEQPACKET` which is unsupported on macOS.
55
#![cfg(not(any(
66
target_os = "ios",
77
target_os = "macos",

0 commit comments

Comments
 (0)