mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-02-17 04:27:08 +00:00
Add AsRef<[u8]> method for Blob (#361)
This commit is contained in:
parent
2f4af2fd8f
commit
fbef59a3f9
@ -260,6 +260,12 @@ impl Blob {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<[u8]> for Blob {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
&self.bytes
|
||||
}
|
||||
}
|
||||
|
||||
impl Bytes32 {
|
||||
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error> {
|
||||
if bytes.len() != 32 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user