dep-protobuf/rust/cpp_kernel/debug.cc
Protobuf Team Bot f810cc5b66 Enable MessageLite::DebugString to use Message::DebugString where possible.
This will mean that calling DebugString on a MessageLite* which is actually a full Message will get the debug info instead of the minimal output.

PiperOrigin-RevId: 649103508
2024-07-03 09:37:37 -07:00

16 lines
407 B
C++

#include "rust/cpp_kernel/debug.h"
#include <string>
#include "google/protobuf/message_lite.h"
#include "rust/cpp_kernel/strings.h"
extern "C" {
google::protobuf::rust::RustStringRawParts proto2_rust_utf8_debug_string(
const google::protobuf::MessageLite* msg) {
std::string text = google::protobuf::Utf8Format(*msg);
return google::protobuf::rust::RustStringRawParts(text);
}
} // extern "C"