Add Default
implementation for Pool
.
This commit is contained in:
parent
12f36d20e7
commit
d43a4228fd
12
src/core.rs
12
src/core.rs
|
@ -516,6 +516,18 @@ pub struct Pool<T> {
|
|||
pub max: T,
|
||||
}
|
||||
|
||||
impl<T> Default for Pool<T>
|
||||
where
|
||||
T: Default,
|
||||
{
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
value: Default::default(),
|
||||
max: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RandomTable<T>(Vec<T>)
|
||||
where
|
||||
|
|
Loading…
Reference in New Issue
Block a user