From 2bef56c44e7fc8ac0b7c130fe6120d00620b8363 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Fri, 25 Jul 2025 13:27:55 +0100 Subject: [PATCH] Implement From for DecodeError --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 4def6ece..2b03cf73 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -495,6 +495,12 @@ impl From for DecodeError { fn from(e: UncheckedHrpstringError) -> Self { Self::Parse(e) } } +#[cfg(feature = "alloc")] +impl From for DecodeError { + #[inline] + fn from(e: ChecksumError) -> Self { Self::Checksum(e) } +} + /// An error while encoding a bech32 string. #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive]