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]