From d35d69a475e9330fe98038d64fa8c592300553d0 Mon Sep 17 00:00:00 2001 From: Robert Klotzner Date: Tue, 22 Jun 2021 15:24:33 +0200 Subject: [PATCH] Add dummy Debug instance to authority discovery service. (#9156) * Add dummy Debug instance to AuthorityDiscoveryService. * Update client/authority-discovery/src/service.rs More idiomatic print Co-authored-by: Pierre Krieger Co-authored-by: Pierre Krieger --- substrate/client/authority-discovery/src/service.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/substrate/client/authority-discovery/src/service.rs b/substrate/client/authority-discovery/src/service.rs index 1da97cbb03..a787ff8f51 100644 --- a/substrate/client/authority-discovery/src/service.rs +++ b/substrate/client/authority-discovery/src/service.rs @@ -16,6 +16,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use std::fmt::Debug; + use crate::ServicetoWorkerMsg; use futures::channel::{mpsc, oneshot}; @@ -30,6 +32,12 @@ pub struct Service { to_worker: mpsc::Sender, } +impl Debug for Service { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_tuple("AuthorityDiscoveryService").finish() + } +} + /// A [`Service`] allows to interact with a [`crate::Worker`], e.g. by querying the /// [`crate::Worker`]'s local address cache for a given [`AuthorityId`]. impl Service {