commit | 714daedc46f0f193015a448cffaf5e3a32266e4a | [log] [tgz] |
---|---|---|
author | pigweed-integration-roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com> | Fri Jul 29 23:16:51 2022 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jul 29 23:16:51 2022 +0000 |
tree | ec3a166495ad751b8fc2908da67d1ed7b1ee462c | |
parent | 7cf677f2a31b1a94e59d15a902e79737e042dfda [diff] |
[roll pigweed] pw_protobuf: Add StreamEncoder::CloseEncoder Previously, `StreamEncoder` would only perform writes to its parent after destruction occurred. This resulted in callers frequently needing to introduce new scopes, often with a comment explaining the API to readers. This change adds the `CloseEncoder` method, which explicitly finalizes the child encoder and performs the writes to the parent, allowing users both to close an encoder before the end of its lexical scope and to make their code more explicit and self-descriptive if desired. Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/103922 https://pigweed.googlesource.com/pigweed/pigweed pigweed Rolled-Commits: c8bb7b15b66e57e..07a61ccf0226a5a Roller-URL: https://ci.chromium.org/b/8807264204315286817 Cq-Cl-Tag: roller-builder:pigweed-zephyr-roller Cq-Cl-Tag: roller-bid:8807264204315286817 CQ-Do-Not-Cancel-Tryjobs: true Change-Id: I9186094f868811df284c3bb2b4d5894b18f1d2ae Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/zephyr-integration/+/103889 Commit-Queue: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com> Bot-Commit: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>