Skip to content

Commit e89e93f

Browse files
committed
feat(common): add 'into_inner' function to 'ProtocolKey'
1 parent ec8d488 commit e89e93f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mithril-common/src/crypto_helper/types/protocol_key.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ where
129129
pub fn key_to_bytes_hex(key: &T) -> StdResult<String> {
130130
key.to_bytes_hex()
131131
}
132+
133+
/// Consume self and return the inner key
134+
pub fn into_inner(self) -> T {
135+
self.key
136+
}
132137
}
133138

134139
impl<T> Deref for ProtocolKey<T>

0 commit comments

Comments
 (0)