From eedf946d9024b2701fae2dd30f87201bd45fc972 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 14 Dec 2023 08:11:19 +0000 Subject: [PATCH] libs: implement Debug for Gate --- libs/utils/src/sync/gate.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/utils/src/sync/gate.rs b/libs/utils/src/sync/gate.rs index 31c76d2f74..abc3842da8 100644 --- a/libs/utils/src/sync/gate.rs +++ b/libs/utils/src/sync/gate.rs @@ -15,6 +15,12 @@ pub struct Gate { name: String, } +impl std::fmt::Debug for Gate { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "Gate<{}>", self.name) + } +} + /// RAII guard for a [`Gate`]: as long as this exists, calls to [`Gate::close`] will /// not complete. #[derive(Debug)]