From b23f66e151672969a0c0f7a9b2752aeadbe68aff Mon Sep 17 00:00:00 2001 From: asynts Date: Sun, 4 Oct 2020 13:29:47 +0200 Subject: [PATCH] AK: Add formatter for URL. --- AK/URL.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AK/URL.h b/AK/URL.h index 3b7d2d247f..2b7c42c65c 100644 --- a/AK/URL.h +++ b/AK/URL.h @@ -102,6 +102,14 @@ inline const LogStream& operator<<(const LogStream& stream, const URL& value) return stream << value.to_string(); } +template<> +struct Formatter : Formatter { + void format(TypeErasedFormatParams& params, FormatBuilder& builder, const URL& value) + { + Formatter::format(params, builder, value.to_string()); + } +}; + template<> struct Traits : public GenericTraits { static unsigned hash(const URL& url) { return url.to_string().hash(); }