PR feedback

This commit is contained in:
Ben Kimock 2023-09-11 18:12:25 -04:00
parent 01e9798148
commit 6cee6b0bde
3 changed files with 56 additions and 36 deletions

View file

@ -394,10 +394,7 @@ struct NodeInfo<K: DepKind> {
impl<K: DepKind> Encodable<FileEncoder> for NodeInfo<K> {
fn encode(&self, e: &mut FileEncoder) {
let header = SerializedNodeHeader::new(self);
e.write_with(|dest| {
*dest = header.bytes;
header.bytes.len()
});
e.write_array(header.bytes);
if header.len().is_none() {
e.emit_usize(self.edges.len());