From 2824e7c7b09e1c77b16df68574fdf0f28de98b0a Mon Sep 17 00:00:00 2001 From: Chase Wilson Date: Mon, 8 Mar 2021 09:39:11 -0600 Subject: [PATCH] Implemented Debug for Stream --- timely/src/dataflow/stream.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/timely/src/dataflow/stream.rs b/timely/src/dataflow/stream.rs index 619229bfa..fec418769 100644 --- a/timely/src/dataflow/stream.rs +++ b/timely/src/dataflow/stream.rs @@ -10,6 +10,7 @@ use crate::communication::Push; use crate::dataflow::Scope; use crate::dataflow::channels::pushers::tee::TeeHelper; use crate::dataflow::channels::Bundle; +use std::fmt; // use dataflow::scopes::root::loggers::CHANNELS_Q; @@ -54,3 +55,15 @@ impl Stream { /// The scope immediately containing the stream. pub fn scope(&self) -> S { self.scope.clone() } } + +impl fmt::Debug for Stream +where + S: Scope, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Stream") + .field("source", &self.name) + // TODO: Use `.finish_non_exhaustive()` after rust/#67364 lands + .finish() + } +}