mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 22:04:44 +00:00
Improve allocations for SszEncoder
This commit is contained in:
@@ -17,13 +17,13 @@ impl Encodable for Foo {
|
||||
+ <Vec<u16> as Encodable>::ssz_fixed_len()
|
||||
+ <u16 as Encodable>::ssz_fixed_len();
|
||||
|
||||
let mut encoder = SszEncoder::container(offset);
|
||||
let mut encoder = SszEncoder::container(buf, offset);
|
||||
|
||||
encoder.append(&self.a);
|
||||
encoder.append(&self.b);
|
||||
encoder.append(&self.c);
|
||||
|
||||
encoder.drain_onto(buf);
|
||||
encoder.finalize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user