Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22c4f0da authored by Zach Johnson's avatar Zach Johnson
Browse files

rusty-gd: call children write_to()s

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I8e8d5a054e9a3f57328d9a0c1cdbaec28a6df9e2
parent aba5b96b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -912,6 +912,14 @@ void PacketDef::GenRustStructImpls(std::ostream& s) const {
    field->GenRustWriter(s, start_field_offset, end_field_offset);
  }

  if (!children_.empty()) {
    s << "match &self.child {";
    for (const auto& child : children_) {
      s << name_ << "DataChild::" << child->name_ << "(value) => value.write_to(buffer),";
    }
    s << "}";
  }

  s << "}\n";

  if (fields_exist) {