mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Remove specialization from Debug implementations
This commit is contained in:
parent
08c20bb017
commit
50d36fb80f
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user