feat: optimize

This commit is contained in:
2023-10-28 16:47:08 +08:00
parent 89ed3c26ed
commit 20b0fe1ea2
3 changed files with 12 additions and 6 deletions

View File

@@ -19,6 +19,12 @@ impl Drop for SecVec {
}
}
impl AsRef<[u8]> for SecVec {
fn as_ref(&self) -> &[u8] {
&self.0
}
}
pub fn read_pin(pin: &Option<String>) -> String {
match pin {
Some(pin) => pin.to_string(),