@@ -545,6 +545,7 @@ where
545
545
546
546
/// An error while constructing a [`SegwitHrpstring`] type.
547
547
#[ derive( Debug , Clone , PartialEq , Eq ) ]
548
+ #[ non_exhaustive]
548
549
pub enum SegwitHrpstringError {
549
550
/// Error while parsing the encoded address string.
550
551
Unchecked ( UncheckedHrpstringError ) ,
@@ -591,23 +592,28 @@ impl std::error::Error for SegwitHrpstringError {
591
592
}
592
593
593
594
impl From < UncheckedHrpstringError > for SegwitHrpstringError {
595
+ #[ inline]
594
596
fn from ( e : UncheckedHrpstringError ) -> Self { Self :: Unchecked ( e) }
595
597
}
596
598
597
599
impl From < WitnessLengthError > for SegwitHrpstringError {
600
+ #[ inline]
598
601
fn from ( e : WitnessLengthError ) -> Self { Self :: WitnessLength ( e) }
599
602
}
600
603
601
604
impl From < PaddingError > for SegwitHrpstringError {
605
+ #[ inline]
602
606
fn from ( e : PaddingError ) -> Self { Self :: Padding ( e) }
603
607
}
604
608
605
609
impl From < ChecksumError > for SegwitHrpstringError {
610
+ #[ inline]
606
611
fn from ( e : ChecksumError ) -> Self { Self :: Checksum ( e) }
607
612
}
608
613
609
614
/// An error while constructing a [`CheckedHrpstring`] type.
610
615
#[ derive( Debug , Clone , PartialEq , Eq ) ]
616
+ #[ non_exhaustive]
611
617
pub enum CheckedHrpstringError {
612
618
/// Error while parsing the encoded address string.
613
619
Parse ( UncheckedHrpstringError ) ,
@@ -639,10 +645,12 @@ impl std::error::Error for CheckedHrpstringError {
639
645
}
640
646
641
647
impl From < UncheckedHrpstringError > for CheckedHrpstringError {
648
+ #[ inline]
642
649
fn from ( e : UncheckedHrpstringError ) -> Self { Self :: Parse ( e) }
643
650
}
644
651
645
652
impl From < ChecksumError > for CheckedHrpstringError {
653
+ #[ inline]
646
654
fn from ( e : ChecksumError ) -> Self { Self :: Checksum ( e) }
647
655
}
648
656
@@ -680,10 +688,12 @@ impl std::error::Error for UncheckedHrpstringError {
680
688
}
681
689
682
690
impl From < CharError > for UncheckedHrpstringError {
691
+ #[ inline]
683
692
fn from ( e : CharError ) -> Self { Self :: Char ( e) }
684
693
}
685
694
686
695
impl From < hrp:: Error > for UncheckedHrpstringError {
696
+ #[ inline]
687
697
fn from ( e : hrp:: Error ) -> Self { Self :: Hrp ( e) }
688
698
}
689
699
@@ -770,6 +780,7 @@ impl std::error::Error for ChecksumError {
770
780
771
781
/// Error validating the padding bits on the witness data.
772
782
#[ derive( Debug , Clone , PartialEq , Eq ) ]
783
+ #[ non_exhaustive]
773
784
pub enum PaddingError {
774
785
/// The data payload has too many bits of padding.
775
786
TooMuch ,
0 commit comments