diff --git a/tsl/platform/protobuf.h b/tsl/platform/protobuf.h index e8bb3c36a..2fda972a7 100644 --- a/tsl/platform/protobuf.h +++ b/tsl/platform/protobuf.h @@ -112,7 +112,8 @@ inline bool SerializeToTString(const protobuf::MessageLite& proto, inline bool ParseFromTString(const tstring& input, protobuf::MessageLite* proto) { - return proto->ParseFromArray(input.data(), static_cast(input.size())); + return proto->ParseFromString( + absl::string_view(input.data(), static_cast(input.size()))); } // Analogue to StringOutputStream for tstring.