diff --git a/src/iceberg/type.cc b/src/iceberg/type.cc index 44512c0d3..99b3433b3 100644 --- a/src/iceberg/type.cc +++ b/src/iceberg/type.cc @@ -150,14 +150,7 @@ ListType::ListType(int32_t field_id, std::shared_ptr type, bool optional) : element_(field_id, std::string(kElementName), std::move(type), optional) {} TypeId ListType::type_id() const { return kTypeId; } -std::string ListType::ToString() const { - // XXX: work around Clang/libc++: "<{}>" in a format string appears to get - // parsed as {<>} or something; split up the format string to avoid that - std::string repr = "list<"; - std::format_to(std::back_inserter(repr), "{}", element_); - repr += ">"; - return repr; -} +std::string ListType::ToString() const { return std::format("list<{}>", element_); } std::span ListType::fields() const { return {&element_, 1}; } Result> ListType::GetFieldById( @@ -213,13 +206,7 @@ const SchemaField& MapType::value() const { return fields_[1]; } TypeId MapType::type_id() const { return kTypeId; } std::string MapType::ToString() const { - // XXX: work around Clang/libc++: "<{}>" in a format string appears to get - // parsed as {<>} or something; split up the format string to avoid that - std::string repr = "map<"; - - std::format_to(std::back_inserter(repr), "{}: {}", key(), value()); - repr += ">"; - return repr; + return std::format("map<{}: {}>", key(), value()); } std::span MapType::fields() const { return fields_; }