| 549 | } |
| 550 | |
| 551 | absl::Status LegacyListValue::Contains( |
| 552 | const Value& other, |
| 553 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 554 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 555 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 556 | CEL_ASSIGN_OR_RETURN(auto legacy_other, LegacyValue(arena, other)); |
| 557 | const auto* cel_list = impl_; |
| 558 | for (int i = 0; i < cel_list->size(); ++i) { |
| 559 | auto element = cel_list->Get(arena, i); |
| 560 | absl::optional<bool> equal = |
| 561 | interop_internal::CelValueEqualImpl(element, legacy_other); |
| 562 | // Heterogeneous equality behavior is to just return false if equality |
| 563 | // undefined. |
| 564 | if (equal.has_value() && *equal) { |
| 565 | *result = TrueValue(); |
| 566 | return absl::OkStatus(); |
| 567 | } |
| 568 | } |
| 569 | *result = FalseValue(); |
| 570 | return absl::OkStatus(); |
| 571 | } |
| 572 | |
| 573 | std::string LegacyMapValue::DebugString() const { |
| 574 | return CelValue::CreateMap(impl_).DebugString(); |
nothing calls this directly
no test coverage detected