From 1857d5b73fdf137a23b8266b923047f8cc07bd49 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 13 Jun 2018 13:25:45 +0200 Subject: fix Default impl for RecordFunc Deriving it puts the Default trait bound on X, T and D, even though this is not necessary. --- src/statistics/math.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/statistics') diff --git a/src/statistics/math.rs b/src/statistics/math.rs index 6e7e666..f0b0384 100644 --- a/src/statistics/math.rs +++ b/src/statistics/math.rs @@ -45,7 +45,7 @@ struct Record { /// * `T` tag for each data point. Can be arbitrary. /// * `D` actual data. Must be [`Monoid`](trait.Monoid.html), so that it can be /// summed up. -#[derive(Clone, Default)] +#[derive(Clone)] pub struct RecordFunc { data: Vec>, } @@ -138,6 +138,12 @@ where } } +impl Default for RecordFunc { + fn default() -> Self { + Self::new() + } +} + #[cfg(test)] mod test { use super::*; -- cgit v1.2.3