Skip to content

Commit 97b4a40

Browse files
authored
Implemented Debug for Stream (#361)
1 parent 84b1116 commit 97b4a40

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

timely/src/dataflow/stream.rs

+13
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use crate::communication::Push;
1010
use crate::dataflow::Scope;
1111
use crate::dataflow::channels::pushers::tee::TeeHelper;
1212
use crate::dataflow::channels::Bundle;
13+
use std::fmt;
1314

1415
// use dataflow::scopes::root::loggers::CHANNELS_Q;
1516

@@ -54,3 +55,15 @@ impl<S: Scope, D> Stream<S, D> {
5455
/// The scope immediately containing the stream.
5556
pub fn scope(&self) -> S { self.scope.clone() }
5657
}
58+
59+
impl<S, D> fmt::Debug for Stream<S, D>
60+
where
61+
S: Scope,
62+
{
63+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
64+
f.debug_struct("Stream")
65+
.field("source", &self.name)
66+
// TODO: Use `.finish_non_exhaustive()` after rust/#67364 lands
67+
.finish()
68+
}
69+
}

0 commit comments

Comments
 (0)