We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c52450 commit 6de5151Copy full SHA for 6de5151
src/task/mod.rs
@@ -30,6 +30,7 @@
30
use std::prelude::v1::*;
31
32
use std::cell::Cell;
33
+use std::fmt;
34
use std::sync::Arc;
35
use std::sync::atomic::{Ordering, AtomicUsize, ATOMIC_USIZE_INIT};
36
use std::thread;
@@ -157,6 +158,14 @@ impl Task {
157
158
}
159
160
161
+impl fmt::Debug for Task {
162
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
163
+ f.debug_struct("Task")
164
+ .field("id", &self.id)
165
+ .finish()
166
+ }
167
+}
168
+
169
/// Representation of a spawned future/stream.
170
///
171
/// This object is returned by the `spawn` function in this module. This
0 commit comments