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

Commit b447a3e9 authored by Zach Johnson's avatar Zach Johnson Committed by Automerger Merge Worker
Browse files

Merge "rusty-gd: Use entire slice during packet parsing" am: 4bb8e007 am: 7a025d9d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1563152

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie5a4c9b103573cef675ba4495c0fc6ed59ab667c
parents 2db17b81 7a025d9d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -944,10 +944,10 @@ void PacketDef::GenRustStructImpls(std::ostream& s) const {
        s << name_ << "DataChild::";
        s << name_ << "DataChild::";
        s << desc_path[0]->name_ << "(Arc::new(";
        s << desc_path[0]->name_ << "(Arc::new(";
        if (desc_path[0]->parent_constraints_.empty()) {
        if (desc_path[0]->parent_constraints_.empty()) {
          s << desc_path[0]->name_ << "Data::parse(&bytes[" << payload_offset.bytes() << "..]";
          s << desc_path[0]->name_ << "Data::parse(&bytes[..]";
          s << ", " << enum_variant << ")?))";
          s << ", " << enum_variant << ")?))";
        } else {
        } else {
          s << desc_path[0]->name_ << "Data::parse(&bytes[" << payload_offset.bytes() << "..])?))";
          s << desc_path[0]->name_ << "Data::parse(&bytes[..])?))";
        }
        }
      } else if (constraint_type == ScalarField::kFieldType) {
      } else if (constraint_type == ScalarField::kFieldType) {
        s << std::get<int64_t>(desc.second) << " => {";
        s << std::get<int64_t>(desc.second) << " => {";