mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 12:28:24 +00:00
Improve allocations for SszEncoder
This commit is contained in:
@@ -109,13 +109,13 @@ pub fn ssz_encode_derive(input: TokenStream) -> TokenStream {
|
||||
)*
|
||||
0;
|
||||
|
||||
let mut encoder = ssz::SszEncoder::container(offset);
|
||||
let mut encoder = ssz::SszEncoder::container(buf, offset);
|
||||
|
||||
#(
|
||||
encoder.append(&self.#field_idents);
|
||||
)*
|
||||
|
||||
encoder.drain_onto(buf);
|
||||
encoder.finalize();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user