Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few typos #132

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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