Skip to content

Commit

Permalink
Rustdoc clippy and typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcebox committed Oct 7, 2024
1 parent f09c219 commit 5e66561
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/indexmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ where
/// Remove the key-value pair equivalent to `key` and return its value.
///
/// Like `Vec::swap_remove`, the pair is removed by swapping it with the last element of the map
/// and popping it off. **This perturbs the postion of what used to be the last element!**
/// and popping it off. **This perturbs the position of what used to be the last element!**
///
/// Return `None` if `key` is not in map.
///
Expand Down
4 changes: 2 additions & 2 deletions src/mpmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
//! not.
//! - All execution times are in clock cycles. 1 clock cycle = 125 ns.
//! - Execution time is *dependent* of `mem::size_of::<T>()`. Both operations include one
//! `memcpy(T)` in their successful path.
//! `memcpy(T)` in their successful path.
//! - The optimization level is indicated in parentheses.
//! - The numbers reported correspond to the successful path (i.e. `Some` is returned by `dequeue`
//! and `Ok` is returned by `enqueue`).
//! and `Ok` is returned by `enqueue`).
//!
//! # Portability
//!
Expand Down
4 changes: 2 additions & 2 deletions src/spsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
//!
//! - All execution times are in clock cycles. 1 clock cycle = 125 ns.
//! - Execution time is *dependent* of `mem::size_of::<T>()`. Both operations include one
//! `memcpy(T)` in their successful path.
//! `memcpy(T)` in their successful path.
//! - The optimization level is indicated in the first row.
//! - The numbers reported correspond to the successful path (i.e. `Some` is returned by `dequeue`
//! and `Ok` is returned by `enqueue`).
//! and `Ok` is returned by `enqueue`).

use core::{borrow::Borrow, cell::UnsafeCell, fmt, hash, mem::MaybeUninit, ptr};

Expand Down
6 changes: 3 additions & 3 deletions src/string/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,9 +852,9 @@ pub fn format<const N: usize>(args: Arguments<'_>) -> Result<String<N>, fmt::Err
/// There are two possible error cases. Both return the unit type [`core::fmt::Error`].
///
/// - In case the formatting exceeds the string's capacity. This error does not exist in
/// the standard library as the string would just grow.
/// the standard library as the string would just grow.
/// - If a formatting trait implementation returns an error. The standard library panics
/// in this case.
/// in this case.
///
/// # Examples
///
Expand Down Expand Up @@ -1102,7 +1102,7 @@ mod tests {
match s.pop() {
Some(c) => {
assert_eq!(s.len(), 1);
assert_eq!(c, '\u{0301}'); // accute accent of e
assert_eq!(c, '\u{0301}'); // acute accent of e
}
None => panic!(),
};
Expand Down

0 comments on commit 5e66561

Please sign in to comment.