From d43a4228fdb26054c5e99e02505eb0fa46554a8e Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 5 Oct 2021 09:16:44 -0500 Subject: [PATCH] Add `Default` implementation for `Pool`. --- src/core.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/core.rs b/src/core.rs index 75122b4..7bccd86 100644 --- a/src/core.rs +++ b/src/core.rs @@ -516,6 +516,18 @@ pub struct Pool { pub max: T, } +impl Default for Pool +where + T: Default, +{ + fn default() -> Self { + Self { + value: Default::default(), + max: Default::default(), + } + } +} + #[derive(Clone, Debug)] pub struct RandomTable(Vec) where