add From<&str> for Pubkey

This commit is contained in:
William Casarin committed 2023-06-28 21:30:02 +02:00
1 parent 9a3a01f405
commit 44fd75167e
2 files changed
+10 -1

No files matched your search

+6
View File
@@ -15,6 +15,12 @@ impl From<String> for Pubkey {
}
}
impl From<&str> for Pubkey {
fn from(s: &str) -> Self {
Pubkey(s.to_owned())
}
}
impl From<Pubkey> for String {
fn from(pk: Pubkey) -> Self {
pk.0