Skip to content

Commit 066d30f

Browse files
committed
add Signature::as_array
1 parent 9919546 commit 066d30f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

signature/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ impl Default for Signature {
3939

4040
impl solana_sanitize::Sanitize for Signature {}
4141

42+
impl Signature {
43+
/// Return a reference to the `Signature`'s byte array.
44+
#[inline(always)]
45+
pub const fn as_array(&self) -> &[u8; SIGNATURE_BYTES] {
46+
&self.0
47+
}
48+
}
49+
4250
#[cfg(feature = "rand")]
4351
impl Signature {
4452
pub fn new_unique() -> Self {

0 commit comments

Comments
 (0)