about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-01-20 13:09:19 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-01-20 13:10:36 +0100
commit50d36fb80f1aabd100b597e903c8095743a32eb4 (patch)
treec724a825f9122c9b304f36b6de61ecfa1ee241d3
parent08c20bb017756a271dd94dc0f1fffe1f77ec56c0 (diff)
downloadrust-50d36fb80f1aabd100b597e903c8095743a32eb4.tar.gz
rust-50d36fb80f1aabd100b597e903c8095743a32eb4.zip
Remove specialization from Debug implementations
-rw-r--r--src/librand/distributions/mod.rs12
-rw-r--r--src/librand/distributions/range.rs6
-rw-r--r--src/librand/lib.rs24
-rw-r--r--src/librand/reseeding.rs8
4 files changed, 1 insertions, 49 deletions
diff --git a/src/librand/distributions/mod.rs b/src/librand/distributions/mod.rs
index fb0c9f17cf3..eb9476efb7b 100644
--- a/src/librand/distributions/mod.rs
+++ b/src/librand/distributions/mod.rs
@@ -94,12 +94,6 @@ pub struct Weighted<T> {
     pub item: T,
 }
 
-impl<T> fmt::Debug for Weighted<T> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("Weighted")
-    }
-}
-
 impl<T: fmt::Debug> fmt::Debug for Weighted<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("Weighted")
@@ -212,12 +206,6 @@ impl<'a, T: Clone> IndependentSample<T> for WeightedChoice<'a, T> {
     }
 }
 
-impl<'a, T> fmt::Debug for WeightedChoice<'a, T> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("WeightedChoice")
-    }
-}
-
 impl<'a, T: fmt::Debug> fmt::Debug for WeightedChoice<'a, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("WeightedChoice")
diff --git a/src/librand/distributions/range.rs b/src/librand/distributions/range.rs
index 0df876fb16f..be238b0b1ab 100644
--- a/src/librand/distributions/range.rs
+++ b/src/librand/distributions/range.rs
@@ -58,12 +58,6 @@ impl<Sup: SampleRange> IndependentSample<Sup> for Range<Sup> {
     }
 }
 
-impl<X> fmt::Debug for Range<X> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("Range { .. }")
-    }
-}
-
 impl<X: fmt::Debug> fmt::Debug for Range<X> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("Range")
diff --git a/src/librand/lib.rs b/src/librand/lib.rs
index 888f0bc9b55..f2b43a20f94 100644
--- a/src/librand/lib.rs
+++ b/src/librand/lib.rs
@@ -291,12 +291,6 @@ impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> {
     }
 }
 
-impl<'a, T, R> fmt::Debug for Generator<'a, T, R> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("Generator { .. }")
-    }
-}
-
 impl<'a, T, R: fmt::Debug> fmt::Debug for Generator<'a, T, R> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("Generator")
@@ -323,12 +317,6 @@ impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> {
     }
 }
 
-impl<'a, R> fmt::Debug for AsciiGenerator<'a, R> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("AsciiGenerator { .. }")
-    }
-}
-
 impl<'a, R: fmt::Debug> fmt::Debug for AsciiGenerator<'a, R> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("AsciiGenerator")
@@ -446,12 +434,6 @@ impl Rand for XorShiftRng {
 /// `[0,1)`.
 pub struct Open01<F>(pub F);
 
-impl<F> fmt::Debug for Open01<F> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("Open01 { .. }")
-    }
-}
-
 impl<F: fmt::Debug> fmt::Debug for Open01<F> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Open01")
@@ -468,12 +450,6 @@ impl<F: fmt::Debug> fmt::Debug for Open01<F> {
 /// `[0,1)`.
 pub struct Closed01<F>(pub F);
 
-impl<F> fmt::Debug for Closed01<F> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("Closed01 { .. }")
-    }
-}
-
 impl<F: fmt::Debug> fmt::Debug for Closed01<F> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Closed01")
diff --git a/src/librand/reseeding.rs b/src/librand/reseeding.rs
index 89ed53f76a1..21684e38f7b 100644
--- a/src/librand/reseeding.rs
+++ b/src/librand/reseeding.rs
@@ -95,14 +95,8 @@ impl<S, R: SeedableRng<S>, Rsdr: Reseeder<R> + Default>
     }
 }
 
-impl<R, Rsdr> fmt::Debug for ReseedingRng<R, Rsdr> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.pad("ReseedingRng { .. }")
-    }
-}
-
 impl<R: fmt::Debug, Rsdr: fmt::Debug> fmt::Debug for ReseedingRng<R, Rsdr> {
-    default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("ReseedingRng")
          .field("rng", &self.rng)
          .field("generation_threshold", &self.generation_threshold)