Skip to content

Commit bb5a3a3

Browse files
authored
address!: Add conditional debug derive (#325)
Add conditional debug derive
1 parent abd58a0 commit bb5a3a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

address/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ const PDA_MARKER: &[u8; 21] = b"ProgramDerivedAddress";
8383
#[cfg_attr(all(feature = "borsh", feature = "std"), derive(BorshSchema))]
8484
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
8585
#[cfg_attr(feature = "bytemuck", derive(Pod, Zeroable))]
86-
#[derive(Clone, Copy, Default, Eq, Ord, PartialOrd)]
8786
#[cfg_attr(feature = "dev-context-only-utils", derive(Arbitrary))]
87+
#[cfg_attr(not(feature = "decode"), derive(Debug))]
88+
#[derive(Clone, Copy, Default, Eq, Ord, PartialOrd)]
8889
pub struct Address(pub(crate) [u8; 32]);
8990

9091
#[cfg(feature = "sanitize")]

0 commit comments

Comments
 (0)