Make code compatible with Rust 2018

This commit is contained in:
Vinzent Steinberg 2019-07-08 16:04:19 +02:00
parent 3326a8bb9c
commit 1bdadfae1b
4 changed files with 9 additions and 8 deletions

View File

@ -9,6 +9,7 @@ name = "average"
readme = "README.md" readme = "README.md"
repository = "https://github.com/vks/average" repository = "https://github.com/vks/average"
version = "0.10.0" version = "0.10.0"
edition = "2018"
[features] [features]
serde1 = ["serde", "serde_derive", "serde-big-array"] serde1 = ["serde", "serde_derive", "serde-big-array"]

View File

@ -108,12 +108,12 @@ mod quantile;
mod traits; mod traits;
#[macro_use] mod histogram; #[macro_use] mod histogram;
pub use moments::{Mean, Variance, Skewness, Kurtosis, MeanWithError}; pub use crate::moments::{Mean, Variance, Skewness, Kurtosis, MeanWithError};
pub use weighted_mean::{WeightedMean, WeightedMeanWithError}; pub use crate::weighted_mean::{WeightedMean, WeightedMeanWithError};
pub use minmax::{Min, Max}; pub use crate::minmax::{Min, Max};
pub use quantile::Quantile; pub use crate::quantile::Quantile;
pub use traits::{Estimate, Merge, Histogram}; pub use crate::traits::{Estimate, Merge, Histogram};
define_histogram!(hist, 10); define_histogram!(hist, 10);
pub use hist::Histogram as Histogram10; pub use crate::hist::Histogram as Histogram10;
define_moments!(Moments4, 4); define_moments!(Moments4, 4);

View File

@ -20,7 +20,7 @@ use average::{Histogram, Merge};
define_histogram!(hist10, 10); define_histogram!(hist10, 10);
define_histogram!(hist100, 100); define_histogram!(hist100, 100);
use hist10::Histogram as Histogram10; use crate::hist10::Histogram as Histogram10;
#[test] #[test]
fn with_const_width() { fn with_const_width() {

View File

@ -9,7 +9,7 @@ use core::iter::Iterator;
use average::Mean; use average::Mean;
use proptest::prelude::*; use proptest::prelude::*;
use prop::num::f64; use crate::prop::num::f64;
proptest! { proptest! {
#![proptest_config(ProptestConfig::with_cases(10000))] #![proptest_config(ProptestConfig::with_cases(10000))]