@@ -582,7 +582,7 @@ pub enum ParseError {
582
582
TooShortDataPart ,
583
583
UnexpectedEndOfTaggedFields ,
584
584
DescriptionDecodeError ( str:: Utf8Error ) ,
585
- PaddingError ( bech32 :: Error ) ,
585
+ PaddingError ,
586
586
IntegerOverflowError ,
587
587
InvalidSegWitProgramLength ,
588
588
InvalidPubKeyHashLength ,
@@ -616,9 +616,6 @@ impl Display for ParseError {
616
616
DescriptionDecodeError ( ref e) => {
617
617
write ! ( f, "{} ({})" , self . description( ) , e)
618
618
}
619
- PaddingError ( ref e) => {
620
- write ! ( f, "{} ({})" , self . description( ) , e)
621
- } ,
622
619
InvalidSliceLength ( ref function) => {
623
620
write ! ( f, "{} (in function {})" , self . description( ) , function)
624
621
}
@@ -643,7 +640,7 @@ impl error::Error for ParseError {
643
640
TooShortDataPart => "data part too short (should be at least 111 bech32 chars long)" ,
644
641
UnexpectedEndOfTaggedFields => "tagged fields part ended unexpectedly" ,
645
642
DescriptionDecodeError ( _) => "description is no valid utf-8 string" ,
646
- PaddingError ( _ ) => "some data field had bad padding" ,
643
+ PaddingError => "some data field had bad padding" ,
647
644
IntegerOverflowError => "parsed integer doesn't fit into receiving type" ,
648
645
InvalidSegWitProgramLength => "fallback SegWit program is too long or too short" ,
649
646
InvalidPubKeyHashLength => "fallback public key hash has a length unequal 20 bytes" ,
@@ -672,7 +669,7 @@ from_error!(ParseError::DescriptionDecodeError, str::Utf8Error);
672
669
impl From < bech32:: Error > for ParseError {
673
670
fn from ( e : bech32:: Error ) -> Self {
674
671
match e {
675
- bech32:: Error :: InvalidPadding => ParseError :: PaddingError ( e ) ,
672
+ bech32:: Error :: InvalidPadding => ParseError :: PaddingError ,
676
673
_ => ParseError :: Bech32Error ( e)
677
674
}
678
675
}
0 commit comments