diff options
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 7 | ||||
| -rw-r--r-- | src/libtest/stats.rs | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index f9fb767f77e..f2706298066 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -63,7 +63,6 @@ use std::any::Any; use std::cmp; use std::collections::BTreeMap; use std::f64; -use std::fmt::Show; use std::fmt; use std::io::fs::PathExtensions; use std::io::stdio::StdWriter; @@ -109,9 +108,9 @@ impl TestName { } } } -impl fmt::String for TestName { +impl fmt::Display for TestName { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::String::fmt(self.as_slice(), f) + fmt::Display::fmt(self.as_slice(), f) } } @@ -172,7 +171,7 @@ impl TestFn { } } -impl fmt::Show for TestFn { +impl fmt::Debug for TestFn { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str(match *self { StaticTestFn(..) => "StaticTestFn(..)", diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index 6061c4fd1d3..cd461cf5766 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -333,7 +333,7 @@ pub fn winsorize<T: Float + FromPrimitive>(samples: &mut [T], pct: T) { } /// Render writes the min, max and quartiles of the provided `Summary` to the provided `Writer`. -pub fn write_5_number_summary<W: Writer, T: Float + fmt::String + fmt::Show>(w: &mut W, +pub fn write_5_number_summary<W: Writer, T: Float + fmt::Display + fmt::Debug>(w: &mut W, s: &Summary<T>) -> io::IoResult<()> { let (q1,q2,q3) = s.quartiles; write!(w, "(min={}, q1={}, med={}, q3={}, max={})", @@ -355,7 +355,7 @@ pub fn write_5_number_summary<W: Writer, T: Float + fmt::String + fmt::Show>(w: /// ```{.ignore} /// 10 | [--****#******----------] | 40 /// ``` -pub fn write_boxplot<W: Writer, T: Float + fmt::String + fmt::Show + FromPrimitive>( +pub fn write_boxplot<W: Writer, T: Float + fmt::Display + fmt::Debug + FromPrimitive>( w: &mut W, s: &Summary<T>, width_hint: uint) |
