Skip to content

Commit f106686

Browse files
author
Jorge Aparicio
committed
fix(lib): enums are now namespaced
See rust-lang/rust#18973 `Tails` variants: `OneTailed` and `TwoTailed` have been renamed to `Tails::{One, Two}` [breaking-change]
1 parent d3899fa commit f106686

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/outliers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
use std::num;
44

5+
use outliers::Label::{HighMild, HighSevere, LowMild, LowSevere, NotAnOutlier};
56
use {Simd, Stats};
67

78
// TODO Add more outlier classification methods

src/ttest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ impl<A: Float> TDistribution<A> {
8686

8787
match tails {
8888
// XXX This division by two assumes that the t-distribution is symmetric
89-
OneTailed => p_value / num::cast(2f64).unwrap(),
90-
TwoTailed => p_value,
89+
Tails::One => p_value / num::cast(2f64).unwrap(),
90+
Tails::Two => p_value,
9191
}
9292
}
9393
}
9494

9595
/// Number of tails to consider for the t-test
9696
pub enum Tails {
97-
OneTailed,
98-
TwoTailed,
97+
One,
98+
Two,
9999
}
100100

101101
#[cfg(test)]

0 commit comments

Comments
 (0)