From 4ec62bbac872bbfd95413af2f00c3f4a36c70630 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 4 Apr 2020 13:48:56 +0200 Subject: switch from quick_error to thiserror thiserror seems to be the more modern approach that also works with the new Error trait from std. --- src/statistics/math.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/statistics/math.rs') diff --git a/src/statistics/math.rs b/src/statistics/math.rs index b7dd6ac..a0849a3 100644 --- a/src/statistics/math.rs +++ b/src/statistics/math.rs @@ -25,7 +25,8 @@ pub trait Monoid: Semigroup { } #[derive(Debug, Clone)] -struct Record { +#[doc(hidden)] +pub struct Record { x: X, tag: T, data: D, @@ -63,6 +64,11 @@ where RecordFunc { data: Vec::new() } } + #[doc(hidden)] + pub fn data(&self) -> &[Record] { + &self.data + } + /// Insert a data point into the record func. /// /// Note that you should supply the *increment*, not the *absolute value*! -- cgit v1.2.3