Manual Debug
impls are not needed since TypeCx: Debug
This commit is contained in:
parent
15b473451c
commit
40402cbada
3 changed files with 4 additions and 49 deletions
|
@ -1198,6 +1198,7 @@ impl<'p, Cx: TypeCx> fmt::Debug for Matrix<'p, Cx> {
|
|||
/// The final `Pair(Some(_), true)` is then the resulting witness.
|
||||
///
|
||||
/// See the top of the file for more detailed explanations and examples.
|
||||
#[derive(Debug)]
|
||||
struct WitnessStack<Cx: TypeCx>(Vec<WitnessPat<Cx>>);
|
||||
|
||||
impl<Cx: TypeCx> Clone for WitnessStack<Cx> {
|
||||
|
@ -1206,12 +1207,6 @@ impl<Cx: TypeCx> Clone for WitnessStack<Cx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Cx: TypeCx> fmt::Debug for WitnessStack<Cx> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt.debug_tuple("WitnessStack").field(&self.0).finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<Cx: TypeCx> WitnessStack<Cx> {
|
||||
/// Asserts that the witness contains a single pattern, and returns it.
|
||||
fn single_pattern(self) -> WitnessPat<Cx> {
|
||||
|
@ -1256,6 +1251,7 @@ impl<Cx: TypeCx> WitnessStack<Cx> {
|
|||
///
|
||||
/// Just as the `Matrix` starts with a single column, by the end of the algorithm, this has a single
|
||||
/// column, which contains the patterns that are missing for the match to be exhaustive.
|
||||
#[derive(Debug)]
|
||||
struct WitnessMatrix<Cx: TypeCx>(Vec<WitnessStack<Cx>>);
|
||||
|
||||
impl<Cx: TypeCx> Clone for WitnessMatrix<Cx> {
|
||||
|
@ -1264,12 +1260,6 @@ impl<Cx: TypeCx> Clone for WitnessMatrix<Cx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Cx: TypeCx> fmt::Debug for WitnessMatrix<Cx> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt.debug_tuple("WitnessMatrix").field(&self.0).finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<Cx: TypeCx> WitnessMatrix<Cx> {
|
||||
/// New matrix with no witnesses.
|
||||
fn empty() -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue