Add another convenience method for arrays, this time 64 bytes.
This commit is contained in:
parent
049998c751
commit
3a7ddbad2d
|
|
@ -273,6 +273,14 @@ pub trait ReadZcashExt: io::Read {
|
|||
self.read_exact(&mut bytes)?;
|
||||
Ok(bytes)
|
||||
}
|
||||
|
||||
/// Convenience method to read a `[u8; 64]`.
|
||||
#[inline]
|
||||
fn read_64_bytes(&mut self) -> io::Result<[u8; 64]> {
|
||||
let mut bytes = [0; 64];
|
||||
self.read_exact(&mut bytes)?;
|
||||
Ok(bytes)
|
||||
}
|
||||
}
|
||||
|
||||
/// Mark all types implementing `Read` as implementing the extension.
|
||||
|
|
|
|||
Loading…
Reference in New Issue