Skip to content

Commit 48a7707

Browse files
committed
Update to Rust 2018
1 parent ed3f782 commit 48a7707

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "ndarray-stats"
33
version = "0.1.0"
44
authors = ["Jim Turner <ndarray-stats@turner.link>", "LukeMathWalker <rust@lpalmieri.com>"]
5+
edition = "2018"
56

67
license = "MIT/Apache-2.0"
78

src/entropy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ where
218218
mod tests {
219219
use super::EntropyExt;
220220
use approx::assert_abs_diff_eq;
221-
use errors::{EmptyInput, MultiInputError};
221+
use crate::errors::{EmptyInput, MultiInputError};
222222
use ndarray::{array, Array1};
223223
use noisy_float::types::n64;
224224
use std::f64;

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ extern crate ndarray_rand;
4040
#[cfg(test)]
4141
extern crate quickcheck;
4242

43-
pub use correlation::CorrelationExt;
44-
pub use entropy::EntropyExt;
45-
pub use histogram::HistogramExt;
46-
pub use maybe_nan::{MaybeNan, MaybeNanExt};
47-
pub use quantile::{interpolate, Quantile1dExt, QuantileExt};
48-
pub use sort::Sort1dExt;
49-
pub use summary_statistics::SummaryStatisticsExt;
43+
pub use crate::correlation::CorrelationExt;
44+
pub use crate::entropy::EntropyExt;
45+
pub use crate::histogram::HistogramExt;
46+
pub use crate::maybe_nan::{MaybeNan, MaybeNanExt};
47+
pub use crate::quantile::{interpolate, Quantile1dExt, QuantileExt};
48+
pub use crate::sort::Sort1dExt;
49+
pub use crate::summary_statistics::SummaryStatisticsExt;
5050

5151
mod correlation;
5252
mod entropy;

src/maybe_nan/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@ pub trait MaybeNan: Sized {
1818
/// Converts the value.
1919
///
2020
/// If the value is `None`, a NaN value is returned.
21-
fn from_not_nan(Self::NotNan) -> Self;
21+
fn from_not_nan(_: Self::NotNan) -> Self;
2222

2323
/// Converts the value.
2424
///
2525
/// If the value is `None`, a NaN value is returned.
26-
fn from_not_nan_opt(Option<Self::NotNan>) -> Self;
26+
fn from_not_nan_opt(_: Option<Self::NotNan>) -> Self;
2727

2828
/// Converts the value.
2929
///
3030
/// If the value is `None`, a NaN value is returned.
31-
fn from_not_nan_ref_opt(Option<&Self::NotNan>) -> &Self;
31+
fn from_not_nan_ref_opt(_: Option<&Self::NotNan>) -> &Self;
3232

3333
/// Returns a view with the NaN values removed.
3434
///
3535
/// This modifies the input view by moving elements as necessary. The final
3636
/// order of the elements is unspecified. However, this method is
3737
/// idempotent, and given the same input data, the result is always ordered
3838
/// the same way.
39-
fn remove_nan_mut(ArrayViewMut1<Self>) -> ArrayViewMut1<Self::NotNan>;
39+
fn remove_nan_mut(_: ArrayViewMut1<Self>) -> ArrayViewMut1<Self::NotNan>;
4040
}
4141

4242
/// Returns a view with the NaN values removed.

src/quantile/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use self::interpolate::{higher_index, lower_index, Interpolate};
22
use super::sort::get_many_from_sorted_mut_unchecked;
33
use crate::errors::{EmptyInput, MinMaxError, MinMaxError::UndefinedOrder};
4-
use errors::QuantileError;
4+
use crate::errors::QuantileError;
55
use ndarray::prelude::*;
66
use ndarray::{Data, DataMut, RemoveAxis, Zip};
77
use noisy_float::types::N64;
88
use std::cmp;
9-
use {MaybeNan, MaybeNanExt};
9+
use crate::{MaybeNan, MaybeNanExt};
1010

1111
/// Quantile methods for `ArrayBase`.
1212
pub trait QuantileExt<A, S, D>

0 commit comments

Comments
 (0)