match maybestr {
None => None,
Some(s) => {
- let mut it = s.as_slice().split('.');
+ let mut it = s.split('.');
match (it.next().and_then(from_str::<uint>), it.next().and_then(from_str::<uint>),
it.next()) {
(Some(a), Some(b), None) => {
Pretty(_) => unreachable!()
};
- let apos = s.as_slice().find_str("a").unwrap();
- let bpos = s.as_slice().find_str("b").unwrap();
+ let apos = s.find_str("a").unwrap();
+ let bpos = s.find_str("b").unwrap();
assert!(apos < bpos);
}
// This constant is derived by smarter statistics brains than me, but it is
// consistent with how R and other packages treat the MAD.
let number = FromPrimitive::from_f64(1.4826).unwrap();
- abs_devs.as_slice().median() * number
+ abs_devs.median() * number
}
fn median_abs_dev_pct(&self) -> T {