@@ -545,6 +545,7 @@ where
545545
546546/// An error while constructing a [`SegwitHrpstring`] type.
547547#[ derive( Debug , Clone , PartialEq , Eq ) ]
548+ #[ non_exhaustive]
548549pub enum SegwitHrpstringError {
549550 /// Error while parsing the encoded address string.
550551 Unchecked ( UncheckedHrpstringError ) ,
@@ -591,23 +592,28 @@ impl std::error::Error for SegwitHrpstringError {
591592}
592593
593594impl From < UncheckedHrpstringError > for SegwitHrpstringError {
595+ #[ inline]
594596 fn from ( e : UncheckedHrpstringError ) -> Self { Self :: Unchecked ( e) }
595597}
596598
597599impl From < WitnessLengthError > for SegwitHrpstringError {
600+ #[ inline]
598601 fn from ( e : WitnessLengthError ) -> Self { Self :: WitnessLength ( e) }
599602}
600603
601604impl From < PaddingError > for SegwitHrpstringError {
605+ #[ inline]
602606 fn from ( e : PaddingError ) -> Self { Self :: Padding ( e) }
603607}
604608
605609impl From < ChecksumError > for SegwitHrpstringError {
610+ #[ inline]
606611 fn from ( e : ChecksumError ) -> Self { Self :: Checksum ( e) }
607612}
608613
609614/// An error while constructing a [`CheckedHrpstring`] type.
610615#[ derive( Debug , Clone , PartialEq , Eq ) ]
616+ #[ non_exhaustive]
611617pub enum CheckedHrpstringError {
612618 /// Error while parsing the encoded address string.
613619 Parse ( UncheckedHrpstringError ) ,
@@ -639,10 +645,12 @@ impl std::error::Error for CheckedHrpstringError {
639645}
640646
641647impl From < UncheckedHrpstringError > for CheckedHrpstringError {
648+ #[ inline]
642649 fn from ( e : UncheckedHrpstringError ) -> Self { Self :: Parse ( e) }
643650}
644651
645652impl From < ChecksumError > for CheckedHrpstringError {
653+ #[ inline]
646654 fn from ( e : ChecksumError ) -> Self { Self :: Checksum ( e) }
647655}
648656
@@ -680,10 +688,12 @@ impl std::error::Error for UncheckedHrpstringError {
680688}
681689
682690impl From < CharError > for UncheckedHrpstringError {
691+ #[ inline]
683692 fn from ( e : CharError ) -> Self { Self :: Char ( e) }
684693}
685694
686695impl From < hrp:: Error > for UncheckedHrpstringError {
696+ #[ inline]
687697 fn from ( e : hrp:: Error ) -> Self { Self :: Hrp ( e) }
688698}
689699
@@ -770,6 +780,7 @@ impl std::error::Error for ChecksumError {
770780
771781/// Error validating the padding bits on the witness data.
772782#[ derive( Debug , Clone , PartialEq , Eq ) ]
783+ #[ non_exhaustive]
773784pub enum PaddingError {
774785 /// The data payload has too many bits of padding.
775786 TooMuch ,
0 commit comments