summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-12-18 11:38:43 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-12-18 16:35:48 +0100
commitec850e2658110eb8ec147f5e9d6e44238877a4f4 (patch)
tree0283ce396159cb08c1e0e411138e554b66b5acea
parentfd1173f06e746995db066222b7be76879fe53d22 (diff)
Implement Debug for GossipReactor instead of deriving it
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--lib/src/reactor/gossip/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/src/reactor/gossip/mod.rs b/lib/src/reactor/gossip/mod.rs
index 11cdc61..652d91d 100644
--- a/lib/src/reactor/gossip/mod.rs
+++ b/lib/src/reactor/gossip/mod.rs
@@ -47,13 +47,18 @@ impl ReactorBuilder for GossipReactorBuilder {
}
}
-#[derive(Debug)]
pub struct GossipReactor {
profile: Arc<RwLock<Profile>>,
gossip_topic_name: String,
receiver: ReactorReceiver<GossipRequest, GossipReply>,
}
+impl std::fmt::Debug for GossipReactor {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "GossipReactor {{ topic: '{}' }}", self.gossip_topic_name)
+ }
+}
+
impl GossipReactor {
fn send_gossip_reply(channel: ReplySender<GossipReply>, reply: GossipReply) -> Result<()> {
if let Err(_) = channel.send(reply) {