about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorAlex Saveau <saveau.alexandre@gmail.com>2022-11-04 20:05:22 -0700
committerAlex Saveau <saveau.alexandre@gmail.com>2022-11-04 20:06:18 -0700
commit849d89b0312f1d61d51ee1e2139876a4eb0f0fc4 (patch)
tree7234c79413b03cb9043df17a14dbcdc2d5f5071d /library/std/src
parent4827ceecb9ee9bc0508fecf7059bcc134ca187d0 (diff)
downloadrust-849d89b0312f1d61d51ee1e2139876a4eb0f0fc4.tar.gz
rust-849d89b0312f1d61d51ee1e2139876a4eb0f0fc4.zip
Small round of typo fixes
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/f32.rs2
-rw-r--r--library/std/src/f64.rs2
-rw-r--r--library/std/src/sys/windows/c.rs2
-rw-r--r--library/std/src/sys/windows/pipe.rs9
4 files changed, 8 insertions, 7 deletions
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 be6fc2ebb7a..e6d3d46c9f9 100644
--- a/library/std/src/sys/windows/c.rs
+++ b/library/std/src/sys/windows/c.rs
@@ -362,7 +362,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 _)),
         }
     }