From c89065db166a1c2cac018d638e031ef98f93558e Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 17 Oct 2023 10:48:43 +1100 Subject: [PATCH] Make struct error internals public Its better if a struct error has a public inner field so users can access it in ways other than through `Display`. Audit all the struct errors (only found one) and add `pub` to the inner field. --- src/primitives/segwit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primitives/segwit.rs b/src/primitives/segwit.rs index af9ccd729..52e41f8d9 100644 --- a/src/primitives/segwit.rs +++ b/src/primitives/segwit.rs @@ -55,7 +55,7 @@ pub fn validate_witness_program_length( /// Field element does not represent a valid witness version. #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] -pub struct InvalidWitnessVersionError(Fe32); +pub struct InvalidWitnessVersionError(pub Fe32); impl fmt::Display for InvalidWitnessVersionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {