mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
Get all processors to compile again
Requires splitting `serai-cosign` into `serai-cosign` and `serai-cosign-types` so the processor don't require `serai-client/serai` (not correct yet).
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use core::convert::AsRef;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
use zeroize::Zeroize;
|
||||
@@ -150,13 +151,18 @@ impl TryFrom<Vec<u8>> for ExternalAddress {
|
||||
vec.try_into().map(ExternalAddress).map_err(|_| FromVecError::TooLong)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ExternalAddress> for Vec<u8> {
|
||||
fn from(ext: ExternalAddress) -> Vec<u8> {
|
||||
ext.0.into_inner()
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<[u8]> for ExternalAddress {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.0.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl zeroize::Zeroize for ExternalAddress {
|
||||
fn zeroize(&mut self) {
|
||||
self.0.as_mut().zeroize();
|
||||
|
||||
Reference in New Issue
Block a user