summaryrefslogtreecommitdiff
path: root/absl/status
diff options
context:
space:
mode:
authorGravatar Patrick Xia <patrickx@google.com>2023-04-27 09:23:15 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-04-27 09:24:32 -0700
commit65109ecdf01a829bdb5e428174b3abb181e75826 (patch)
tree4124e802a548d12a240b876396f1b645ac49e0d9 /absl/status
parent8518869eb9a8ef098a9dd7780b9e55d5b43b5873 (diff)
trivial: format some files using clang-format
PiperOrigin-RevId: 527598377 Change-Id: I0ae1505db595b7f3a420f2f608c6e02f8800f138
Diffstat (limited to 'absl/status')
-rw-r--r--absl/status/status.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/absl/status/status.cc b/absl/status/status.cc
index 160eb417..d011075a 100644
--- a/absl/status/status.cc
+++ b/absl/status/status.cc
@@ -80,10 +80,8 @@ std::ostream& operator<<(std::ostream& os, StatusCode code) {
namespace status_internal {
static absl::optional<size_t> FindPayloadIndexByUrl(
- const Payloads* payloads,
- absl::string_view type_url) {
- if (payloads == nullptr)
- return absl::nullopt;
+ const Payloads* payloads, absl::string_view type_url) {
+ if (payloads == nullptr) return absl::nullopt;
for (size_t i = 0; i < payloads->size(); ++i) {
if ((*payloads)[i].type_url == type_url) return i;
@@ -125,8 +123,7 @@ absl::optional<absl::Cord> Status::GetPayload(
const auto* payloads = GetPayloads();
absl::optional<size_t> index =
status_internal::FindPayloadIndexByUrl(payloads, type_url);
- if (index.has_value())
- return (*payloads)[index.value()].payload;
+ if (index.has_value()) return (*payloads)[index.value()].payload;
return absl::nullopt;
}
@@ -303,7 +300,7 @@ std::string Status::ToStringSlow(StatusToStringMode mode) const {
absl::StrAppend(&text, absl::StatusCodeToString(code()), ": ", message());
const bool with_payload = (mode & StatusToStringMode::kWithPayload) ==
- StatusToStringMode::kWithPayload;
+ StatusToStringMode::kWithPayload;
if (with_payload) {
status_internal::StatusPayloadPrinter printer =