From e57cfd0ee0ac20cc0f0a25fb19c8f4db8cff01a3 Mon Sep 17 00:00:00 2001 From: renshyle Date: Mon, 20 May 2024 10:32:36 +0300 Subject: [PATCH] Fix Debug formatting (#163) --- src/mutex/spin.rs | 2 +- src/mutex/ticket.rs | 2 +- src/rwlock.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mutex/spin.rs b/src/mutex/spin.rs index 42d779b..d8637b2 100644 --- a/src/mutex/spin.rs +++ b/src/mutex/spin.rs @@ -291,7 +291,7 @@ impl fmt::Debug for SpinMutex { 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 {{ }}"), } } diff --git a/src/mutex/ticket.rs b/src/mutex/ticket.rs index ab9c347..a702a97 100644 --- a/src/mutex/ticket.rs +++ b/src/mutex/ticket.rs @@ -159,7 +159,7 @@ impl fmt::Debug for TicketMutex { 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 {{ }}"), } } diff --git a/src/rwlock.rs b/src/rwlock.rs index d2ee745..18266d8 100644 --- a/src/rwlock.rs +++ b/src/rwlock.rs @@ -458,7 +458,7 @@ impl fmt::Debug for RwLock { 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 {{ }}"), } }