Skip to content

Commit 4c64e88

Browse files
committed
feat: add From<&Pubkey> for Pubkey
1 parent 41c663a commit 4c64e88

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pubkey/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,13 @@ impl FromStr for Pubkey {
248248
}
249249
}
250250

251+
impl From<&Pubkey> for Pubkey {
252+
#[inline]
253+
fn from(value: &Pubkey) -> Self {
254+
*value
255+
}
256+
}
257+
251258
impl From<[u8; 32]> for Pubkey {
252259
#[inline]
253260
fn from(from: [u8; 32]) -> Self {

0 commit comments

Comments
 (0)