Commit Graph

6 Commits

Author SHA1 Message Date
Vinzent Steinberg
9401f41558 Use Rust 2018 idioms 2019-07-08 16:04:59 +02:00
Vinzent Steinberg
c10616c46e Improve concatenate! to support usage outside braces
Fixes #12.
2019-04-25 13:51:33 +02:00
Vinzent Steinberg
e4345f5046 impl FromIterator<&f64> and FromIterator<&(f64, f64)>
This allows to write

    let k: Kurtosis = a.iter().collect();

instead of

    let k: Kurtosis = a.iter().map(|x| *x).collect();

but breaks type inference for code like

    let m: Min = (1..6).map(Into::into).collect();

where

    let m: Min = (1..6).map(f64::from).collect();

has to be used instead.

Fixes #8.
2018-02-28 23:44:40 +01:00
Vinzent Steinberg
2ee38b9d57 Fix clippy warnings 2018-01-10 16:02:55 +01:00
Vinzent Steinberg
5d6d67bac9 Move add and merge to trait
This should make it possible to write more generic code.
2017-06-25 15:39:12 +02:00
Vinzent Steinberg
fb1b0879bd Add tests for concatenate 2017-06-21 19:35:41 +02:00