Skip to content

Commit b23f66e

Browse files
asyntsawesomekling
authored andcommitted
AK: Add formatter for URL.
1 parent aa283d2 commit b23f66e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

AK/URL.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ inline const LogStream& operator<<(const LogStream& stream, const URL& value)
102102
return stream << value.to_string();
103103
}
104104

105+
template<>
106+
struct Formatter<URL> : Formatter<StringView> {
107+
void format(TypeErasedFormatParams& params, FormatBuilder& builder, const URL& value)
108+
{
109+
Formatter<StringView>::format(params, builder, value.to_string());
110+
}
111+
};
112+
105113
template<>
106114
struct Traits<URL> : public GenericTraits<URL> {
107115
static unsigned hash(const URL& url) { return url.to_string().hash(); }

0 commit comments

Comments
 (0)