| 54 | namespace { |
| 55 | |
| 56 | absl::StatusOr<const google::protobuf::Descriptor* absl_nonnull> GetDescriptor( |
| 57 | const google::protobuf::Message& message) { |
| 58 | const auto* desc = message.GetDescriptor(); |
| 59 | if (ABSL_PREDICT_FALSE(desc == nullptr)) { |
| 60 | return absl::InvalidArgumentError( |
| 61 | absl::StrCat(message.GetTypeName(), " is missing descriptor")); |
| 62 | } |
| 63 | return desc; |
| 64 | } |
| 65 | |
| 66 | absl::StatusOr<absl::optional<ErrorValue>> ProtoMessageCopyUsingSerialization( |
| 67 | google::protobuf::MessageLite* to, const google::protobuf::MessageLite* from) { |