fixes to allow benchmarks to be run for core (#122)
cargo +nightly bench -p grin_core
This commit is contained in:
committed by
Ignotus Peverell
parent
87cd0e5c58
commit
4aea4d0548
+2
-2
@@ -187,13 +187,13 @@ pub trait Readable
|
||||
}
|
||||
|
||||
/// Deserializes a Readeable from any std::io::Read implementation.
|
||||
pub fn deserialize<T: Readable>(mut source: &mut Read) -> Result<T, Error> {
|
||||
pub fn deserialize<T: Readable>(source: &mut Read) -> Result<T, Error> {
|
||||
let mut reader = BinReader { source: source };
|
||||
T::read(&mut reader)
|
||||
}
|
||||
|
||||
/// Serializes a Writeable into any std::io::Write implementation.
|
||||
pub fn serialize<W: Writeable>(mut sink: &mut Write, thing: &W) -> Result<(), Error> {
|
||||
pub fn serialize<W: Writeable>(sink: &mut Write, thing: &W) -> Result<(), Error> {
|
||||
let mut writer = BinWriter { sink: sink };
|
||||
thing.write(&mut writer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user