Skip to content

Commit ae8eabf

Browse files
authored
Merge pull request #610 from fitzgen/futures-cpupool-debug-impls
Futures cpupool debug impls
2 parents 1ad72ea + 2a7ecfe commit ae8eabf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

futures-cpupool/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
//! ```
3636
3737
#![deny(missing_docs)]
38+
#![deny(missing_debug_implementations)]
3839

3940
extern crate futures;
4041
extern crate num_cpus;
@@ -110,12 +111,22 @@ impl fmt::Debug for CpuPool {
110111
}
111112
}
112113

114+
impl fmt::Debug for Builder {
115+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
116+
f.debug_struct("Builder")
117+
.field("pool_size", &self.pool_size)
118+
.field("name_prefix", &self.name_prefix)
119+
.finish()
120+
}
121+
}
122+
113123
/// The type of future returned from the `CpuPool::spawn` function, which
114124
/// proxies the futures running on the thread pool.
115125
///
116126
/// This future will resolve in the same way as the underlying future, and it
117127
/// will propagate panics.
118128
#[must_use]
129+
#[derive(Debug)]
119130
pub struct CpuFuture<T, E> {
120131
inner: Receiver<thread::Result<Result<T, E>>>,
121132
keep_running_flag: Arc<AtomicBool>,

0 commit comments

Comments
 (0)