Skip to content

Commit

Permalink
Fix Debug formatting (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
renshyle authored May 20, 2024
1 parent 7440fab commit e57cfd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mutex/spin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl<T: ?Sized + fmt::Debug, R> fmt::Debug for SpinMutex<T, R> {
match self.try_lock() {
Some(guard) => write!(f, "Mutex {{ data: ")
.and_then(|()| (&*guard).fmt(f))
.and_then(|()| write!(f, "}}")),
.and_then(|()| write!(f, " }}")),
None => write!(f, "Mutex {{ <locked> }}"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/mutex/ticket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl<T: ?Sized + fmt::Debug, R> fmt::Debug for TicketMutex<T, R> {
match self.try_lock() {
Some(guard) => write!(f, "Mutex {{ data: ")
.and_then(|()| (&*guard).fmt(f))
.and_then(|()| write!(f, "}}")),
.and_then(|()| write!(f, " }}")),
None => write!(f, "Mutex {{ <locked> }}"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ impl<T: ?Sized + fmt::Debug, R> fmt::Debug for RwLock<T, R> {
match self.try_read() {
Some(guard) => write!(f, "RwLock {{ data: ")
.and_then(|()| (&*guard).fmt(f))
.and_then(|()| write!(f, "}}")),
.and_then(|()| write!(f, " }}")),
None => write!(f, "RwLock {{ <locked> }}"),
}
}
Expand Down

0 comments on commit e57cfd0

Please sign in to comment.