Fix serde1 feature and remove unneccessary crate import
This commit is contained in:
parent
610f6cae6a
commit
31a8154e01
@ -29,7 +29,7 @@ name = "kurtosis"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
float-ord = "0.2"
|
float-ord = "0.2"
|
||||||
serde = { version = "1", optional = true }
|
serde = { version = "1", features = ["derive"], optional = true }
|
||||||
serde_derive = { version = "1", optional = true }
|
serde_derive = { version = "1", optional = true }
|
||||||
serde-big-array = { version = "0.1.4", optional = true }
|
serde-big-array = { version = "0.1.4", optional = true }
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ macro_rules! define_histogram {
|
|||||||
($name:ident, $LEN:expr) => (
|
($name:ident, $LEN:expr) => (
|
||||||
mod $name {
|
mod $name {
|
||||||
use $crate::Histogram as Trait;
|
use $crate::Histogram as Trait;
|
||||||
|
#[cfg(feature = "serde1")] use ::serde::{Serialize, Deserialize};
|
||||||
#[cfg(feature = "serde1")] serde_big_array::big_array! {
|
#[cfg(feature = "serde1")] serde_big_array::big_array! {
|
||||||
BigArray; LEN, (LEN + 1),
|
BigArray; LEN, (LEN + 1),
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
use core;
|
use core;
|
||||||
|
|
||||||
|
#[cfg(feature = "serde1")] use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
use super::{Estimate, Merge};
|
use super::{Estimate, Merge};
|
||||||
|
|
||||||
/// Calculate the minimum of `a` and `b`.
|
/// Calculate the minimum of `a` and `b`.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use core;
|
use core;
|
||||||
|
|
||||||
use conv::ApproxFrom;
|
use conv::ApproxFrom;
|
||||||
|
#[cfg(feature = "serde1")] use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
use super::{Estimate, Merge};
|
use super::{Estimate, Merge};
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ macro_rules! define_moments {
|
|||||||
($name:ident, $MAX_MOMENT:expr) => (
|
($name:ident, $MAX_MOMENT:expr) => (
|
||||||
use ::conv::ApproxFrom;
|
use ::conv::ApproxFrom;
|
||||||
use ::num_traits::pow;
|
use ::num_traits::pow;
|
||||||
|
#[cfg(feature = "serde1")] use ::serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
/// An iterator over binomial coefficients.
|
/// An iterator over binomial coefficients.
|
||||||
struct IterBinomial {
|
struct IterBinomial {
|
||||||
|
@ -3,6 +3,7 @@ use core::cmp::min;
|
|||||||
|
|
||||||
use conv::{ApproxFrom, ConvAsUtil, ConvUtil, ValueFrom};
|
use conv::{ApproxFrom, ConvAsUtil, ConvUtil, ValueFrom};
|
||||||
use float_ord::sort as sort_floats;
|
use float_ord::sort as sort_floats;
|
||||||
|
#[cfg(feature = "serde1")] use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
use super::Estimate;
|
use super::Estimate;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use core;
|
use core;
|
||||||
|
|
||||||
|
#[cfg(feature = "serde1")] use serde::{Serialize, Deserialize};
|
||||||
use super::{MeanWithError, Estimate, Merge};
|
use super::{MeanWithError, Estimate, Merge};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, map_clone))]
|
||||||
|
|
||||||
#[macro_use] extern crate proptest;
|
|
||||||
|
|
||||||
use core::iter::Iterator;
|
use core::iter::Iterator;
|
||||||
|
|
||||||
use average::Mean;
|
use average::Mean;
|
||||||
|
Loading…
Reference in New Issue
Block a user