Skip to content

Commit

Permalink
feat: add From<&Pubkey> for Pubkey
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverNChalk committed Feb 27, 2025
1 parent 41c663a commit 4c64e88
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pubkey/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ impl FromStr for Pubkey {
}
}

impl From<&Pubkey> for Pubkey {
#[inline]
fn from(value: &Pubkey) -> Self {
*value
}
}

impl From<[u8; 32]> for Pubkey {
#[inline]
fn from(from: [u8; 32]) -> Self {
Expand Down

0 comments on commit 4c64e88

Please sign in to comment.