mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-09 11:25:55 +00:00
Begin refactor for less allocation
This commit is contained in:
@@ -27,9 +27,11 @@ pub fn ssz_encode<T>(val: &T) -> Vec<u8>
|
||||
where
|
||||
T: Encodable,
|
||||
{
|
||||
let mut ssz_stream = SszStream::new();
|
||||
ssz_stream.append(val);
|
||||
ssz_stream.drain()
|
||||
let mut buf = vec![];
|
||||
|
||||
val.ssz_append(&mut buf);
|
||||
|
||||
buf
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user