Remove `T: Default` bound from Default impl

Fixes #7
This commit is contained in:
Taiki Endo 2021-12-30 12:48:10 +09:00
parent 5048c69633
commit 119d3c29d2
1 changed files with 6 additions and 1 deletions

View File

@ -66,7 +66,6 @@ use std::sync::mpsc;
use std::thread;
/// A builder that runs closures in parallel.
#[derive(Default)]
#[must_use]
pub struct Parallel<'a, T> {
/// Closures to run.
@ -263,6 +262,12 @@ impl<T> fmt::Debug for Parallel<'_, T> {
}
}
impl<T> Default for Parallel<'_, T> {
fn default() -> Self {
Self::new()
}
}
/// Aborts the process if dropped while panicking.
struct NoPanic;