Skip to content

Commit

Permalink
Fix a few typos (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Jan 23, 2023
1 parent ef6e68f commit 4e3a5a6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mutex/fair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ mod tests {
let a = mutex.try_lock();
assert_eq!(a.as_ref().map(|r| **r), Some(42));

// Additional lock failes
// Additional lock fails
let b = mutex.try_lock();
assert!(b.is_none());

Expand Down
2 changes: 1 addition & 1 deletion src/mutex/spin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ mod tests {
let a = mutex.try_lock();
assert_eq!(a.as_ref().map(|r| **r), Some(42));

// Additional lock failes
// Additional lock fails
let b = mutex.try_lock();
assert!(b.is_none());

Expand Down
4 changes: 2 additions & 2 deletions src/mutex/ticket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{

/// A spin-based [ticket lock](https://en.wikipedia.org/wiki/Ticket_lock) providing mutually exclusive access to data.
///
/// A ticket lock is analagous to a queue management system for lock requests. When a thread tries to take a lock, it
/// A ticket lock is analogous to a queue management system for lock requests. When a thread tries to take a lock, it
/// is assigned a 'ticket'. It then spins until its ticket becomes next in line. When the lock guard is released, the
/// next ticket will be processed.
///
Expand Down Expand Up @@ -443,7 +443,7 @@ mod tests {
let a = mutex.try_lock();
assert_eq!(a.as_ref().map(|r| **r), Some(42));

// Additional lock failes
// Additional lock fails
let b = mutex.try_lock();
assert!(b.is_none());

Expand Down
2 changes: 1 addition & 1 deletion src/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl<T, R: RelaxStrategy> Once<T, R> {
Ordering::Acquire,
) {
Ok(_must_be_state_incomplete) => {
// The compare-exchange suceeded, so we shall initialize it.
// The compare-exchange succeeded, so we shall initialize it.

// We use a guard (Finish) to catch panics caused by builder
let finish = Finish { status: &self.status };
Expand Down

0 comments on commit 4e3a5a6

Please sign in to comment.