|
@@ -48,7 +48,18 @@ template<>
|
|
|
struct Formatter<Kernel::KString> : Formatter<StringView> {
|
|
|
void format(FormatBuilder& builder, Kernel::KString const& value)
|
|
|
{
|
|
|
- Formatter<StringView>::format(builder, value.characters());
|
|
|
+ Formatter<StringView>::format(builder, value.view());
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+template<>
|
|
|
+struct Formatter<OwnPtr<Kernel::KString>> : Formatter<StringView> {
|
|
|
+ void format(FormatBuilder& builder, OwnPtr<Kernel::KString> const& value)
|
|
|
+ {
|
|
|
+ if (value)
|
|
|
+ Formatter<StringView>::format(builder, value->view());
|
|
|
+ else
|
|
|
+ Formatter<StringView>::format(builder, "[out of memory]"sv);
|
|
|
}
|
|
|
};
|
|
|
|