Skip to content

Commit e728aac

Browse files
committed
fix: regression in doc tests for nightly channel
1 parent a3bfd7f commit e728aac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/statistics/slice_statistics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl Min<f64> for [f64] {
118118
/// use std::f64;
119119
/// use statrs::statistics::Min;
120120
///
121-
/// let x = [];
121+
/// let x: [f64; 0] = [];
122122
/// assert!(x.min().is_nan());
123123
///
124124
/// let y = [0.0, f64::NAN, 3.0, -2.0];
@@ -145,7 +145,7 @@ impl Max<f64> for [f64] {
145145
/// use std::f64;
146146
/// use statrs::statistics::Max;
147147
///
148-
/// let x = [];
148+
/// let x: [f64; 0] = [];
149149
/// assert!(x.max().is_nan());
150150
///
151151
/// let y = [0.0, f64::NAN, 3.0, -2.0];

src/statistics/statistics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub enum RankTieBreaker {
1717
pub trait Statistics<T> {
1818
/// Returns the minimum value in the data
1919
///
20-
/// # Rermarks
20+
/// # Remarks
2121
///
2222
/// Returns `f64::NAN` if data is empty or an entry is `f64::NAN`
2323
///
@@ -27,7 +27,7 @@ pub trait Statistics<T> {
2727
/// use std::f64;
2828
/// use statrs::statistics::Statistics;
2929
///
30-
/// let x = [];
30+
/// let x: [f64; 0] = [];
3131
/// assert!(x.min().is_nan());
3232
///
3333
/// let y = [0.0, f64::NAN, 3.0, -2.0];
@@ -50,7 +50,7 @@ pub trait Statistics<T> {
5050
/// use std::f64;
5151
/// use statrs::statistics::Max;
5252
///
53-
/// let x = [];
53+
/// let x: [f64; 0] = [];
5454
/// assert!(x.max().is_nan());
5555
///
5656
/// let y = [0.0, f64::NAN, 3.0, -2.0];

0 commit comments

Comments
 (0)