Browse Source

AK: Add formatter for LexcialPath.

asynts 4 năm trước cách đây
mục cha
commit
cf6980848b
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      AK/LexicalPath.h

+ 8 - 0
AK/LexicalPath.h

@@ -64,6 +64,14 @@ private:
     bool m_is_absolute { false };
 };
 
+template<>
+struct Formatter<LexicalPath> : Formatter<StringView> {
+    void format(TypeErasedFormatParams& params, FormatBuilder& builder, const LexicalPath& value)
+    {
+        Formatter<StringView>::format(params, builder, value.string());
+    }
+};
+
 };
 
 using AK::LexicalPath;