mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Add initial basic tests for serai-client-serai
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#![deny(missing_docs)]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use core::fmt;
|
||||
extern crate alloc;
|
||||
|
||||
use zeroize::Zeroize;
|
||||
@@ -82,6 +83,15 @@ impl From<sp_core::H256> for BlockHash {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for BlockHash {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
for byte in self.0 {
|
||||
write!(f, "{byte:02x}")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
// These share encodings as 32-byte arrays
|
||||
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||
impl scale::EncodeLike<sp_core::H256> for BlockHash {}
|
||||
|
||||
Reference in New Issue
Block a user