diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-11-05 11:31:30 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-05 11:31:30 +0530 |
| commit | 47e6304e325463bc6608a6f1eb61391fa36dd76a (patch) | |
| tree | 9158e1bf75d8ca28f9e22aef13df9c604c9f0f74 | |
| parent | 61553d178415404ee1e4a4f36f72340dc373324d (diff) | |
| parent | 849d89b0312f1d61d51ee1e2139876a4eb0f0fc4 (diff) | |
| download | rust-47e6304e325463bc6608a6f1eb61391fa36dd76a.tar.gz rust-47e6304e325463bc6608a6f1eb61391fa36dd76a.zip | |
Rollup merge of #103995 - SUPERCILEX:typos, r=Dylan-DPC
Small round of typo fixes
| -rw-r--r-- | library/core/src/cell.rs | 2 | ||||
| -rw-r--r-- | library/core/src/error.md | 2 | ||||
| -rw-r--r-- | library/std/src/f32.rs | 2 | ||||
| -rw-r--r-- | library/std/src/f64.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/c.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/pipe.rs | 9 |
6 files changed, 10 insertions, 9 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 7bf32cb0d98..e6a11218139 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -1856,7 +1856,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> { /// } /// ``` /// -/// Coverting in the other direction from a `&mut T` +/// Converting in the other direction from a `&mut T` /// to an `&UnsafeCell<T>` is allowed: /// /// ```rust diff --git a/library/core/src/error.md b/library/core/src/error.md index 891abebbfd3..78808d489b2 100644 --- a/library/core/src/error.md +++ b/library/core/src/error.md @@ -46,7 +46,7 @@ These functions are equivalent, they either return the inner value if the `Result` is `Ok` or panic if the `Result` is `Err` printing the inner error as the source. The only difference between them is that with `expect` you provide a panic error message to be printed alongside the source, whereas -`unwrap` has a default message indicating only that you unwraped an `Err`. +`unwrap` has a default message indicating only that you unwrapped an `Err`. Of the two, `expect` is generally preferred since its `msg` field allows you to convey your intent and assumptions which makes tracking down the source diff --git a/library/std/src/f32.rs b/library/std/src/f32.rs index 3dd5b12507f..dafcd876744 100644 --- a/library/std/src/f32.rs +++ b/library/std/src/f32.rs @@ -275,7 +275,7 @@ impl f32 { /// This result is not an element of the function's codomain, but it is the /// closest floating point number in the real numbers and thus fulfills the /// property `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)` - /// approximatively. + /// approximately. /// /// # Examples /// diff --git a/library/std/src/f64.rs b/library/std/src/f64.rs index 31351a87978..77048f9a28f 100644 --- a/library/std/src/f64.rs +++ b/library/std/src/f64.rs @@ -275,7 +275,7 @@ impl f64 { /// This result is not an element of the function's codomain, but it is the /// closest floating point number in the real numbers and thus fulfills the /// property `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)` - /// approximatively. + /// approximately. /// /// # Examples /// diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs index fc2dc42833d..81461de4f72 100644 --- a/library/std/src/sys/windows/c.rs +++ b/library/std/src/sys/windows/c.rs @@ -363,7 +363,7 @@ impl IO_STATUS_BLOCK { pub type LPOVERLAPPED_COMPLETION_ROUTINE = unsafe extern "system" fn( dwErrorCode: DWORD, - dwNumberOfBytesTransfered: DWORD, + dwNumberOfBytesTransferred: DWORD, lpOverlapped: *mut OVERLAPPED, ); diff --git a/library/std/src/sys/windows/pipe.rs b/library/std/src/sys/windows/pipe.rs index 013c776c476..9f26acc4520 100644 --- a/library/std/src/sys/windows/pipe.rs +++ b/library/std/src/sys/windows/pipe.rs @@ -324,17 +324,18 @@ impl AnonPipe { let mut async_result: Option<AsyncResult> = None; struct AsyncResult { error: u32, - transfered: u32, + transferred: u32, } // STEP 3: The callback. unsafe extern "system" fn callback( dwErrorCode: u32, - dwNumberOfBytesTransfered: u32, + dwNumberOfBytesTransferred: u32, lpOverlapped: *mut c::OVERLAPPED, ) { // Set `async_result` using a pointer smuggled through `hEvent`. - let result = AsyncResult { error: dwErrorCode, transfered: dwNumberOfBytesTransfered }; + let result = + AsyncResult { error: dwErrorCode, transferred: dwNumberOfBytesTransferred }; *(*lpOverlapped).hEvent.cast::<Option<AsyncResult>>() = Some(result); } @@ -365,7 +366,7 @@ impl AnonPipe { // STEP 4: Return the result. // `async_result` is always `Some` at this point match result.error { - c::ERROR_SUCCESS => Ok(result.transfered as usize), + c::ERROR_SUCCESS => Ok(result.transferred as usize), error => Err(io::Error::from_raw_os_error(error as _)), } } |
