Skip to content

Commit

Permalink
add from method
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed May 8, 2024
1 parent 8511443 commit 79aed1a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions basic_credential/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ pub struct StorageId {
value: Vec<u8>,
}

impl From<Vec<u8>> for StorageId {
fn from(vec: Vec<u8>) -> Self {
StorageId { value: vec }
}
}

// Implement key traits for the storage id
impl storage::Key<CURRENT_VERSION> for StorageId {}
impl storage::traits::SignaturePublicKey<CURRENT_VERSION> for StorageId {}
Expand Down

0 comments on commit 79aed1a

Please sign in to comment.